MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_01D7C8C9.7D40F630" This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive. ------=_NextPart_01D7C8C9.7D40F630 Content-Location: file:///C:/9C65918E/LFS170x-Blockchain.htm Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="windows-1252"
LFS170x - Linux <=
span
class=3DSpellE>FoundationX
=
Blockchain:
Understanding Its Use Cases and Implications
Welcome to LFS170x: Blockchain - Understanding Its Use= Cases and Implications
Linux FoundationX - L= FS170x
Once you complete this course, you will have a good un= derstanding of what blockchain is and its impact and potential for change around the wo= rld. You will also be familiar with some of the immediate blockchain use cases in technology, business, and enterprise products and institutions.
LFS170x is part of the Blockcha= in for Business Professional Certificate. Skills in blockchain are being reported as the top job-skill in demand. This program is designed for the business professional who needs to understand the potential (or threat) of blockchain to their company and industry. Armed with better information of = the blockchain landscape, this program will help you rise to new challenges in = your current role by giving you a new dimension on which you can add value to yo= ur employer.
By the end of this chapter, you should be able to:
§ Discuss about blockchain, its characteristics and uses.
§ Discuss about the roles and users in a blockchain.
§ Explain how blockchain is using cryptography.
§ Discuss about public and private blockchains: differences, advantages/ disadvantage= s, use cases.
§ Explain what consensus is and why consensus is needed in a blockchain.
By the end of this section, you should be able to:
§&nb= sp; Explain the concept of blockchain.
§&nb= sp; Discuss the importance of blockchain.
§&nb= sp; Understand how bitcoin is using blockchain.
What is blockchain?
Theres a new technology that has the power to revolut= ionize how you, businesses, and the world interact!
Youve probably heard of it: its called Blockchain!= p>
But what is it? How does it work? How does it affect y= ou?
Hearing the word blockchain is comparable to hearing= the word internet in the early 90s.
It seemed elusive, like something that wasnt going to impact your daily life.
But here we are, more than 20 years later. Think about= how the Internet has transformed businesses, commerce, communication, even music and video.
And thats not even touching on how the Internet has affected you.
We all carry the Internet in our pocket.
We can transfer money at the touch of a button, check = the weather, get directions, and even have food delivered to our door.
The next technology to have that kind of impact isnt = some of the buzzwords you hear.
Its not big data. Its not artificial intelligence. I= ts not even social media.
Its BLOCKCHAIN!
Now, lets discuss the vast promise blockchain has for= every business, every society, and for everyone listening today.
And lets begin with an example we are all familiar wi= th.
When you attach a file, a Word document, an Excel shee= t, a PDF to an email, you arent sending an original.
You are actually sending the recipient a copy, and tha= ts a great way to move information around.
But its not so great when it comes to things like mon= ey, stocks and bonds, music, loyalty points, intellectual property, tickets to a game or concert.
Then, sending a copy is suddenly a very bad idea.
Lets look at an example.
If I send you tickets to a concert, its important tha= t I dont send you a copy.
You now own the original asset and I can no longer use= or sell those tickets.
Similarly, if I send you $100, its important that I s= till dont own the $100, or have the ability to send it to anyone else.
Both of these examples illustrate a double spend probl= em, and those can be eliminated with blockchain.
So now, in this exciting time in history, every kind of asset, from tickets, to money, to music, can be stored, moved, exchanged, a= nd transacted without an intermediary.
People everywhere can transact peer-to-peer and trust = each other by using collaboration and cryptography.
How did we get here, to this place of trust and collaboration?
It began when Satoshi Nakamoto, whose true identity is= still unknown, released a white paper in 2008, introducing a purely peer-to-peer version of electronic cash known as Bitcoin.
It is here that blockchain technology made its debut.<= /p>
Even today people believe Bitcoin and blockchain are o= ne and the same.
They are not!
Bitcoin, another alternative currency, utilize blockch= ain technology.
While an important one, Bitcoin is only one use case= for blockchain.
Blockchain allows people to exchange assets and perform transactions without a third party.
Imagine a world where you dont need intermediaries.= p>
While traditionally we have needed central authorities= to trust one another and fulfill contracts, blockchain makes it possible to ha= ve our peers guarantee that for us. But how?
Assets, like weve discussed, are no longer stored in a central place, but distributed across a global ledger, using the highest le= vel of cryptography.
When a transaction is conducted, its posted across te= ns of thousands of computers around the globe.
These transactions are recorded as blocks.
Lets imagine a sheet of paper that has 25 lines.
When a sheet is filled up with 25 transactions, the bl= ock is validated via group consensus.
Once the page has been validated, it is added to a sta= ck of previously validated sheets.
Each sheet on the stack can be assumed to be trustwort= hy because, once a sheet is validated, it cant be changed.
Because at this point, all the sheets are linked toget= her.
And to link our sheets together, we embed information = from the previous sheet of paper into the new, recently validated sheet.
In blockchain, our sheet of paper is equal to a block.=
The act of embedding a previous block of information i= nto the current block of information is called chaining, hence, the name blockchain.
In order to compromise or hack a blockchain network, s= omeone would have to gain control of the majority of computers in that network.
This is extremely difficult to do.
There is no longer a single point of failure, and this= is what makes blockchain infinitely more secure than what we have today.
Blockchain isnt just for assets, though. It extends to contracts.
These are called Smart Contracts.
And what are they exactly? What they sound like.
A smart contract self-executes and handles enforcement= , the management, and performance of agreements between people.
Examples of smart contracts include insurance policies, copyrighted content, escrow and lending, wills, and trusts.
Smart contracts will revolutionize how we do business.=
There are so many possibilities with blockchain; not j= ust in the now, but with things we havent begun to think about yet.
By the end of this section, you should be able to:
§ Explain what the block in blockchain is.
§ Explain how blocks are chained together.
§ Discuss the concept of immutability in a blockchain.
§ Describe users and their roles in a blockchain.
In this section, wer=
e gonna talk about what blockchain is: a real simple
introduction to the basic concepts and principles behind blockchain.
When you hear about
blockchain, you probably think of new, high-emerging tech.
Well, really, all blo=
ckchain
is, is a combination of technologies that have existed for a long time.
Theyre simply combin=
ed in a
new and creative way to give us an amazing new platform on which we can sta=
rt
to build solutions.
Blockchains are often
referred to as digital decentralized ledgers.
And when you think of=
that,
all you can think of is something were all familiar with: a simple noteboo=
k.
When we talk about bl=
ocks and
blockchain, all were really talking about is a page of data.
We fill up this page =
with any
kind of data imaginable, and, while most of the time today, were talking a=
bout
recording financial transactions on this page, or this ledger, or this bloc=
k, we
can record any kind of data we want.
In fact, you can thin=
k of a
block as being exactly like this piece of paper, in that the paper doesnt =
know
or care what kind of information youre recording on it.
And just like the pap=
er doesnt
know or care, neither does the block in a blockchain.
So, while most of wha=
t were
recording today are financial transactions, we could also record things like
voting records and results, land titling, medical records, or even the open=
ing
notes to a Beethoven symphony.
What makes this block=
chain
notebook incredibly powerful is that all the pages are linked together.
So that if I go back =
and try
and change any data on any page anywhere in this notebook, I break a link i=
n a
very obvious and easy-to-determine way.
This gives blockchain=
a key
property known as immutability.
And its what gives
blockchain the security that weve come to know and depend on.
Blockchains also give=
us an
incredible technology called smart contracts, which allow us to
programmatically define the rules and steps that should be performed any ti=
me a
certain type of event is recorded in our blockchain or in our magic noteboo=
k.
So, when you think ab=
out
blockchain, dont get intimidated thinking its something high tech, and ne=
w,
and cutting-edge.
Its simply a new and
creative way of combining old ideas together to give us an incredible new
solutions platform.
And the rest of this =
series
will take a deeper dive into these basic concepts and principles, but if the
idea of this unchangeable linked notebook makes sense, congratulations!
You already understan=
d all
the major principles and concepts required to understand what blockchain is=
and
why its so powerful.
A block on a blockcha=
in can
be thought of much like a page in a notebook. Data is stored on a block, ju=
st
like data is written on a page of a notebook.
Any data can be stored on the same block. Examples of = stored data include:
·&nb= sp; Medical Records
·&nb= sp; Property Agreements
·&nb= sp; Voting
Each block is chained or tied to the previous block by embedding the block with information from the previous block (we will go through this in depth later in the course).
If the data is tampered with anywhere in the chain, the links will break in a very obvious way:
This provides immutability and security.
In this section, were going to discuss the core compo= nents of the blockchain, starting with a high-level view of the blockchain components.
The first blockchain component that were going to loo= k at its the ledger.
However, before we discuss the ledger, lets discuss b= riefly the history of the ledger.
The story of blockchain is tightly coupled with the st= ory of accounting.
Historically, humans started off with no way to prove ownership and we began with a single entry accou= nting system.
The single entry accounting= system for the first time in human history allowed us to prove ownership of the as= set.
The ledger was associated with an owner.
The single entry accounting= worked for centuries.
The issue with single entry accounting is that it mand= ated that there was a single authority, which is the reason why there was the necessity for a king or a queen to control the ledger.
In order to have trade, right, at the international le= vel, we needed to have at least two authorities.
So, for instance, for England to do trade with France,= we had the owner of the ledger, the single entry le= dger, in England for instance, doing trade with the king or queen of France, who = also had their ledger.
And so, we needed a new form of accounting, and thats= where double entry accounting came in, which was in use up until very recently, n= ow, within the last 40 years.
What blockchain is? Blockchain is the very first implementation of triple entry accounting, where we have an asset being recorded on the ledger in the context of a transaction.
The third entry and triple entry accounting is cryptog= raphy, where we have a cryptographic account of the transaction stored permanently= and immutably on the ledger.
Thats what the ledger is. A ledger is a collection of transactions.
It is not a collection of assets. Assets are part of a transaction, but the ledger records the transaction.
In blockchain, the differentiator is that no one owns = the ledger, or all of the participants own the ledger.
The ledger is distributed. It is, in other words, its decentralized. So, theres a copy of the ledger that exists on every node t= hat exists on the network.
Said simply, the ledger is a distributed immutable rec= ord of a collection of transactions.
Bitcoin is the most popular asset.
It was the first asset to be recorded as a transaction= on a blockchain ledger, and it remains the most popular, at least in terms of ma= rket share.
Thats what the ledger is.
As we move to more modern blockchains, we start to loo= k at blockchains such as Ethereum, which not only records the asset on the blockchain,
Ethereum and other public blockchains like Ethereum, t= hey also allow you to have a permanent and immutable collection of code, also k= nown as a smart contract, that runs on the blockchain.
So, the ledger stores the assets, the transactions tha= t are on the blockchain, and it also holds the code.
The code thats stored on the blockchain is a smart contract.
Again, a smart contract is a program that runs on the blockchain.
The blockchain is a network.
The blockchain is a A public blockchain is equivalen= t to the Internet, complete with the its own set of protocols, etc.
Private blockchains are more synonymous with an intran= et.
It is just like we have a use case for public blockch= ains and public internet, we also have use cases for private blockchains and an intranet, if were gonna stay with that analogy= .
On each of these networks there are nodes. The nodes a= re going to be synonymous with the computers that make up the network.
On the nodes, they are put together by a collection of protocols.
Each blockchain has its own set of protocols that defi= nes not only the nodes, but how those nodes communicate with each other.
So, when you hear the term peer network, thats what= were talking about; were talking about how that blockchain is put together, what are the protocols that define the peers, and how those peers interact.
Those peer networks, they store the ledger, they provi= de the updates, they effectively, they maintain the ledger.
Thats what a peer is on a peer network.
On a public blockchain, its public, and, by definitio= n, that means that anyone is allowed to join and participate in that public blockchain.
On the private blockchain, however, the situation is a little different.
On the private blockchain, we have to control who can = access your network.
Just like no company would allow no company would all= ow anyone to access their private intranet, in a private blockchain you have t= o be asked to join, or you have to have permission to join.
So, a membership service is a gateway that allows user= s and components to enter a private blockchain.
So, a membership service or a membership service provi= der provides the services of user authentication, user authorization, component authentication, component authorization, more specifically Identity Managem= ent.
If were talking about a private blockchain, then we h= ave to control who the members are, and not only the members.
We have to also control the nodes that access the blockchain.
So, as were talking about membership, one of the key components of membership is we have to allow certain users to access the blockchain.
In order to do that, we have to have a definitive iden= tity for each user.
In the blockchain, thats achieved in two ways.
One, we use PKI, to provide a public key. And that pub= lic key represents the identity of the user.
But we also need a private key that each user can hold= to prove their identity.
That private key is stored in a wallet. And a wallet i= s a collection of the user credentials. It is effectively it encapsulates pri= vate keys.
Additionally, in the blockchain blockchains are self-contained, or they should be self-contained.
And so, one of the key aspects for developing on a blockchain or using a blockchain is we have to have a way to interact with = the blockchain.
And one of the ways that we do that is through events.=
So, when something occurs on the blockchain, either pu= blic blockchains most public blockchains anyway, and certainly all private blockchains, they have events that are fired when certain key actions are triggered.
This allows end-users, other systems, other users, dif= ferent components to be able to act off of the events that come from an update on a blockchain.
The blockchain is built of several different types of components, each with a specific role to play within the blockchains operation:
§&nb= sp; Ledger: A distributed, immutable historical record
§&nb= sp; Peer Network: Stores, updates, and maintains the ledger
§&nb= sp; Membership Services: User authentication, authorization, and identity management= p>
§&nb= sp; Smart Contract: Program that runs on the blockchain
§&nb= sp; Wallet: Stores users credentials
§&nb= sp; Events: Notifications of updates and actions on the blockchain
§&nb= sp; Systems Management: Component creation, modification, and monitoring
§&nb= sp; Systems Integration: Integration of blockchain with external systems.
Next, lets discuss each of these components in more d= etail.
Ledger: A distributed, immutable historical reco=
rd
The goal of the blockchain is to create a distributed, immuta=
ble
record of the history of the blockchain called the ledger.
Peer Network: Stores, updates, and maintains the
ledger
The ledger is stored, updated, and maintained by a peer netwo=
rk.
Each node in this network maintains its own copy of the ledger. It is the j=
ob
of the network as a whole to come to a consensus on the contents of each up=
date
to the ledger. This ensures that each individual copy of the ledger is
identical without requiring a centralized "official copy of the ledge=
r.
Membership Services: User authentication,
authorization, and identity management
On some blockchains, anyone can join the peer network and all
network members have equal powers and authority. Permissioned blockchains
require authorization to join and Membership Services authenticates,
authorizes, and manages the identity of users on the blockchain.
Smart Contract: Program that runs on the blockch=
ain
The original blockchains were designed to simply allow financ=
ial
transactions to be performed and stored in the historical ledger, and had
limited configurability. Since then, blockchains have evolved so that some =
have
become fully functional distributed computers. Smart contracts are programs
that run on the blockchain. Users can interact with smart contracts in a
similar way that they interact with programs on a standard computer.
Wallet: Stores users
credentials
In blockchain, the user's wallet stores their credentials and
tracks digital assets associated with the user's address. The wal=
let
tracks user credentials and any other information that may be associated wi=
th
their account.
Events: Notifications of updates and actions on =
the
blockchain
The blockchains ledger and the state of the peer network are
updated by events. Examples of events include the creation and dispersion o=
f a
new transaction across the peer network and the addition of a new block to =
the
blockchain. Events may also include notifications from smart contracts on
blockchains that support such contracts.
Systems Management:
Component creation, modification, and monitoring
The blockchain is designed to be a long-lived system in a fie=
ld
that is constantly evolving. Systems management provides the capability of
creating, modifying, and monitoring blockchain components to meet the needs=
of
its users.
Systems Integration: Integration of blockchain w=
ith
external systems
As blockchain has evolved and increased in functionality, it =
has
become more common to integrate blockchains with other external systems,
commonly through the use of smart contracts. While this is not a specific
component of the blockchain, systems integration is included to acknowledge
this capability.
A business blockchain solution requires many acto= rs playing a variety of roles to be fully functional:
A Blockchain Architect is the designer of the blockchain solution. For a blockchain solution to= be functional, it first needs to exist. The blockchain architect is the person= or group who design the blockchain.
The
The
The
Data
Storage is represente=
d by
traditional databases for storing data off-chain. The blockchain provides
distributed, immutable storage with built-in integrity checking; however, it
has a maximum capacity based on the standard block size and block rate. To
provide integrity verification for large amounts of data, it is common to s=
tore
the data off-chain and store a hash of the data on-chain. This guarantees t=
hat
the data is not being modified while protecting the blockchain from
becoming bloated.
Data Processing is represe= nted by an external system used for additional processing. Smart contracts execu= te on the blockchain, meaning that each member of the peer network must execute the code to remain in sync with the current state of the network. If smart contracts commonly require large amounts of processing power to complete, devices external to the peer network may be used to augment the processing power of the network.
There are a lot of really interesting use cases being explored with blockchain right now.
When you first get into blockchain, one of the areas y= ou'll see people immediately jump to are healthcare, how can we manage our person= al health information on the blockchain, and voting an election reform, and bo= th of these are really, really interesting ideas.
The goal behind the folks looking at blockchain for healthcare is the idea that it would be great if your medical records could= be accessible with your permission to anyone else, anywhere on the planet.
If you're halfway across the world on vacation and you= fall ill and end up in a hospital, wouldn't it be great if the doctor treating y= ou had full insight into your medical records, knew any allergies you had, or = knew any prescriptions that you were already on?
That's a very, very big area, and this ties a lot into blockchain and Identity Management.
How do we safely identify and protect people's persona= l data on blockchain?
A lot of interesting challenges there that are being w= orked out...
Blockchain for voting and election reform is a big top= ic right now, especially with all the conversation lately about how do we ensu= re the integrity of elections and demonstrate that our results haven't been tampered with or altered.
This is an area where blockchain could add a lot of va= lue.
And then, of course, we hear a lot about traditional u= se cases, areas that are getting a lot of traction in blockchain right now.
Probably one of the biggest are supply chain, value ch= ain relationships, which are very, very common in today's economy.
We have very, very few products or services that are o= ffered completely and solely by one organization, without the involvement of other vendors, partners, suppliers, manufacturers, third-party organizations, etc= .
Blockchain to track the supply, the origin of the good= s and services that we consume is a big use case.
Walmart is really pioneering this right now with a blockchain solution that they're using to identify the provenance of meat, = where does the meat that is sold in a Walmart store come from, and the ultimate g= oal here is that, when we do have contaminated foods, and we have to issue a recall, currently, because we just don't have good insight into that supply chain, we recall and destroy a lot more food than we really need to, which = is tremendously wasteful, especially with all the people on the planet that we could be giving that good food to.
These are some real exciting areas that we see being p= ursued in blockchain right now.
On the public sector, there's a lot of interest in blockchain for law enforcement purposes.
How do we allow different law enforcement agencies at = the federal, state, county, city level, all to share data seamlessly, in a safe, secure fashion, which also protects people's personal privacy and anonymity, when appropriate.
Another area where blockchain is getting explored and = is generating a lot of excitement is with artists, with people who produce content.
If you're an author, a musician, an artist, traditiona= lly, you've only been able to get your work out to the public, in the hands of t= he public, by going through a third-party intermediary.
If I'm an author, traditionally, the only way I've bee= n able to share my creation with the general public has been going to a publishing company and getting my works published.
Blockchain enables lots of interesting scenarios where= I can sell that work directly to consumers, create new subscription models, and t= his is having very interesting effects on the work itself.
One of the things we're seeing is that traditional book publishing, there's anywhere between 12 to 18 months delay between when the author finishes the last word of a book and when it actually ends up into t= he consumers hands.
Well, if we can use blockchain to enable consumers to purchase this material or subscribe directly to the content creator, we take that lag time completely out of it.
And this allows authors and content creators to do some really interesting things.
You could write a fictional story and have one of your characters respond real-time to a news story that actually happened last we= ek.
It makes for very compelling reading and it's just som= ething we're not able to do today in the traditional publishing world because of t= hat delay.
We also see a lot of interest in blockchain for fracti= onal asset ownership scenarios.
So, we know we're 10-15 years away from having self-dr= iving cars be a very regular thing, and when we all get our own self-driving car,= if we're smart, we're gonna have that car take us = to work and then turn around and perform ride-sharing services throughout the = day, when we're not using it, in order to recoup some of that investment.
Well, in a blockchain world with coins and tokens, we = can fractionalize that asset ownership, and I can take that same money I used to buy one self-driving car which operates in one city, and I could buy one percent of a hundred self-driving cars in the hundred's biggest cities on t= he planet.
And so, if they're ever weather conditions, where mayb= e my car couldn't operate locally, that's okay.
I have a much more diversified investment, which conti= nues to offer returns, because I have a virtual guarantee that any major city th= at I have one percent of my car ownership in is currently in rush-hour right now= , in peak times of people needing a ride.
So, there are lots of very very= span> interesting use cases for blockchain in the real world right now.
I would encourage all of you to dig in a little bit mo= re, and see some of the interesting things that are going on with blockchain in healthcare, in public sector, in insurance, in supply chain, value chain and more, see what other folks are doing, and then go out and make your own blockchain dreams a reality.
A Business to Consum=
er (B2C) is business or transactions conducted
directly between a company and consumers who are the end-users of its produ=
cts
or services. Services being provided to the consumer is an area of interest=
to
companies.
The jewelry industry has been known for fraud, child l= abor issues, false metal mining, and a clear lack of transparency. A precious me= tals consortium with IBM has established a blockchain initiative around how transparency can be brought to the consumer:
§&nb= sp; The TrustCh= ain Initiative tracks and authenticates diamonds and precious metals through every stage of the supply chain as it becomes a piece of finished jewelry.
§&nb= sp; It provides digital verification, physical product and process verification, as well as third-party oversight. The collaborations goal is to instill trust in the origin and ethical sourcing of jewelry by bringing together a community of responsible and ethical organizations across the complex and multi-tiered jewelry supply chain.
Consumers will see that TrustChai= n establishes a trusted product with documented provenance and brings together quality assurance, social and environmental responsibility, and authenticity spanning the entire jewelry ecosystem from miners, manufacturers, wholesa= le suppliers, and retailers on a single digital platform.
So, when people first start getting into blockchain, o= ne of the areas they really start to look at is where is blockchain being used in= the real world, what examples do we have of a blockchain being deployed and at = what scale.
And there's really no better example of this right now= than what's going on in Dubai.
Dubai, the largest city in the United Arab Emirates, is piloting a very ambitious program called smart Dubai 2021.
And what Smart Dubai 2021 aims to do is to move all governmental operations and record-keeping on the blockchain by the year 20= 21.
The goals of this program are increased transparency i= n the government operations, increased efficiency, and by proxy, providing better service to city residents and constituents and establishing Dubai as a thou= ght leader, an industry leader in the blockchain space.
There are lots of really cool applications that tie in= to this.
Blockchain is becoming the enabling layer for a lot of= other Smart Dubai initiatives around creating a smart city.
So, projects like automated traffic signals, registrat= ion of citizens for governmental services, etc. are all being pioneered on blockch= ain.
So, if you want to see some of the really exciting use= cases in blockchain right now, be sure to check out Dubai and what's going on with their Smart Dubai 2021 initiative.
Dubai aims to be= a pioneer in the adoption of emerging technologies such as blockchain, which = it recognizes has a major potential to transform city services. Dubai is one of the first to fully implement blockchain on a city-wide basis.
Dubai is investing in the Smart Dubai Office (SDO) and 1776 Lau= nch Blockchain Challenge. Sponsored by His Highness Sheikh Hamdan, Dubai is fun= ding blockchain implementation at many levels.
The Dubai Blockchain Strategy is based on three pillar= s:
§&nb= sp; Government Efficiency: Implementing blockchain technology in government services= p>
§&nb= sp; Industry Creation: Supporting the creation of a blockchain industry through empowering startups and businesses
§&nb= sp; Thought Leadership: Leading the global thinking on blockchain technology.
Dubai's adoption of blockchain technology at a city-wi= de scale is a testament to its commitment to positively transform government f= rom service provider to service enabler.
By the end of this section, you should be able to:
§&nb= sp; Describe single, double, and triple entry accounting models.
§&nb= sp; Recall the short history of a distributed ledger.
§&nb= sp; Summarize why blockchain is the modern day distributed led= ger.
· Ledgers first appeared around 3,000 B.C.
· Single-entry only.
· Chanakya, an Indian leader, creates the first documented accounting standards.
· Double-entry ledger appears in 1340 A.D.
· Tracks debits and credits.
· Tells the story of a transaction from both/a= ll sides.
· The Italian Luca Paciol= i, recognized as the father of accounting and bookkeeping, was the first perso= n to publish a work on double-entry bookkeeping and introduced the field in Ital= y.
§&nb= sp; Triple-entry accounting is an enhancement to the traditional double-entry system, in whi= ch all accounting entries involving outside parties are cryptographically seal= ed by a third entry.
§&nb= sp; Debits, credits, and an immutable link to all past debits and credits.
§&nb= sp; Triple-entry ledger appears in 2008 in a white paper by Satoshi Nakamoto (a.k.a., Blockchain).
Let's review an example: A seller books a debit to acc=
ount
for cash received, while a buyer books a credit for cash spent in the same
transaction, but in separate sets of accounting records. This is where the
blockchain comes in: rather than these entries occurring separately in
independent sets of books, they occur in the form of a transfer between wal=
let
addresses in the same distributed, public ledger, which creates an interloc=
king
system of enduring accounting records. Since the entries are distributed and
cryptographically sealed, falsifying them in a credible way or destroying t=
hem
to conceal activity is practically impossible.
Triple-Entry
Accounting Features:
· = Tamper-Proof Records
· = Distributed Ledgers
· = Double-Entry+Cryptograp= hy
· = Validated, Secure, and Private
· = Digitally Signed Receipts.
The concept of distributed ledge's has been around for= hundreds of years.
To understand the basics of blockchain, it's important= to understand how distributed ledgers work.
A distributed ledger is a collection of data with no c= entral administrator that has been agreed upon by consensus.
To understand more details, let's take a trip way back= , back into 500 AD on the island of Yap.
The Yapese people used a very unique form of currency:= the Rai stone.
Each of these stones weighed around 200 kilos, making = them difficult to move.
To exchange them as money for goods or services, they divided the stones into sections and then, they would announce to every adu= lt on the island who owned what part of each stone.
Each adult had to keep a mental ledger of ownership.= p>
Every time any Yapese conducted a trade, an announceme= nt was made to the entire tribe.
Each member of the tribe would then update their mental ledger.
In today's description, this would be called a distrib= uted ledger.
All Rai stone ownership was known to everyone, and that knowledge was updated whenever a transaction was made.
So why didn't just one member of the tribe keep track = of the Rai stones?
What if that main recordkeeper was sick, unable to do = their job, or was found to be dishonest?
If the only copy of the ledger was changed by any mean= s, wealth would be lost or gained unfairly.
The Yapese knew their distributed ledger system safegu= arded it from tampering.
Since all the Yapese knew who owned what, it would be = very difficult to fool everyone on the island.
Even if one tribe member moved away, the tribe still h= ad multiple copies of their mental ledger.
In this regard, the ledger was fault tolerant and coul= d not be easily changed, corrupted, or lost.
The tribe also decided that stones didn't have to be o= n the island to hold value.
One day, a stone fell into the ocean and the Yapese de= cided that this stone, even though it could not be seen, still held value and cou= ld still be traded.
This system of consensus by the majority of the adults= on the island with no central administrator is one of the first examples of distributed ledger.
Let's review an example on Yap Island:
§&nb= sp; Alice agrees to trade Bob her stone by the pond in exchange for all of his cattle= .
§&nb= sp; Alice and Bob announce their transaction to the tribe.
§&nb= sp; Everyone updates their mental ledger.
§&nb= sp; From this point on, they agree that the stone by the pond is owned by Bob.<= /p>
Alice tries to corrupt Carol, so that Carols ledger s= hows that Alice never gave up ownership of the stone.
§&nb=
sp; Centralized
ledger:
Only one place to cheat.
§&nb=
sp; Decentralized
ledger:
Carol will be outvoted by the rest of the tribe, and her version of the led=
ger
will not be accepted.
If Alice wants to cheat, she will need a way to convin= ce 51% or more of the tribe to accept an alternative ledger.
We've gone through history and seen how ledgers have e= volved from stone tablets to double entry ledgers.
We even took a look at the earliest known example of distributed ledgers.
Now, let's discuss the evolution of the ledger in the = modern world.
Over the last few decades, ledgers have moved from the written form to the digital form, also known as computers and digitalized databases.
This has allowed us to be interconnected - a truly glo= bal economy.
Today, this recordkeeping system is being revolutioniz= ed again, going from the digital realm or centralized databases keeping track = of transactions to information being stored across different locations across = the globe.
This system of record, information across a global net= work, is what we call decentralized ledgers.
A decentralized ledger can be described as a ledger of= any transactions or contracts supported by a decentralized network from across different locations and people, eliminating the need of a central authority= .
When a recording is made, every participant is notifie= d of that recording.
They now own an identical copy of the record of transactions, identical to every other node on that network.
Every piece of information on a blockchain can be trac= ed back to the exact moment when it was created.
So, if an audit is necessary, information can be found= and deemed reliable.
This allows blockchain to serve as a truly reliable st= orage of public records and transactions, and therefore eliminating the need for a centralized authority of database of records.
Now that we understand the foundational principle of blockchains - distributed ledgers, it's important to understand another important key element that makes blockchain so revolutionary: trust.
Trust is created through two key principles: collabora= tion and cryptography, both of which will be discussed shortly.
By the end of this section, you should be able to:
§&nb= sp; Discuss how cryptography allows for distributed ledgers to work on a global scale.<= /p>
§&nb= sp; Explain how blockchain is using cryptography.
§&nb= sp; Define key terms of cryptography and understand its basics.
§&nb= sp; Discuss cryptography types: public/private key, hash functions.
§&nb= sp; Explain the concept of Merkle trees and how they are used in blockchain technologie= s.
§&nb= sp; Discuss how different blockchains use cryptography.
A great way to think of blockchain is to think of bloc= kchain as another layer of the Internet, a layer that enables secure and trusted records and transactions to occur, which is why a lot of people associate t= he word blockchain with the word trust.
Blockchain creates a layer of trust between untrusted parties.
Without blockchain to create trusted records and transactions, a third party intermediary is nece= ssary.
Blockchain eliminates the need for a centralized insti= tution to act as intermediary, and instead uses cryptography and collaboration to create that trust.
In an earlier chapter of this cour= se we spoke about collaboration through distributed ledgers.
Now, we will be taking a further look at how cryptogra= phy is used in blockchain to create the second element necessary for blockchain to= be a source of trust.
Information on the blockchain is stored on the ledger = using cryptography.
It can be accessed using keys and cryptographic signat= ures.
Now, let's take a look into some of the key concepts of cryptography that are utilized with blockchain.
So, one of the reoccurring themes in blockchain is that while blockchain itself may be new and cutting-edge, it's built out of noth= ing more than very old tried-and-true technology.
And one of the areas this is most true is in cryptogra= phy.
When a lot of people first get introduced to cryptography they think it's a very new cutting-edge science.
And while there are new developments being made everyday, cryptography itself is a very, very old sci= ence.
One great example of this is the story of Rose Greenho= w.
Rose Greenhow lived in the Washington DC area during t= he Civil War, and she was actually an undercover spy for the Confederate Army.=
Rose Greenhow was a wealthy socialite, and she threw m= any fancy, elaborate parties, and was also invited to many= , many high-end social events.
Many of these events were attended by members of the U= nion Army, generals and strategists, who Rose pretended that she didn't know much about military strategy and wasn't too interested in the war in general.
In secret, at all these events she was soaking up all = the information she could.
Rose actually developed her own method of encrypting d= ata.
She came up with her own encryption scheme and she use= d this scheme to mail letters down to the Confederate Army, revealing the plans of= the Union Army, troop positions, general high-level strategy, etc.
Rose did this for a number of years, until finally her encryption method was broken and she was actually one of the very first peo= ple who were arrested and prosecuted by the Pinkertons, who later went on to fo= rm the Secret Service.
So, when you hear about blockchain and all the new cutting-edge things that it's doing, don't forget that it has its roots in = very old technology, and we're just combining old technology in new and creative ways to create a brand new solutions development platform.
§&nb= sp; Blockchain provides users with data integrity in a trustless environment.
§&nb= sp; This is accomplished using cryptography in a way that moves the burden of trust = from data processors to cryptographic algorithms.
In this section, we will discuss some of the ways cryptography is used in the blockchain.
Let's explain the key terms used in cryptography:
§ Secret: The data which we are trying to protect
§ Key: A piece of data used for encrypting and decrypting the secret
§ Function: The process or function used to encrypt the secret
§ Cipher: The encrypted secret data, the output of the function.
The Secret and the Key are passed into the Function to create the Cipher.
So, one of the technologies that plays a pivotal role = in blockchain and making blockchain secure and immutable is cryptography.
If you've never heard of cryptography before, cryptogr= aphy is simply designed defined as the science of sending messages back and forth from one party to another, in the presence of adversaries or bad actors, participants who may wish to corrupt or change the contents of a message.= p>
And there's some key concepts you should understand ab= out cryptography before we really dive in and talk about how cryptography prote= cts the data on the blockchain.
Most cryptographic functions are what we refer to as t= wo-way functions, meaning that we can take a secret and we can encrypt it, and the= n we can use that same process to decrypt the secret at the other end.
So, some of the key objects or concepts to be aware of= in cryptography:
First of all are the secrets, what data are we trying = to protect, what is the message we're sending back and forth that we want to d= o so in a safe, secure fashion, and try and guarantee that it hasn't been tamper= ed with?
We take our secret and we combine it with a key, a pie= ce of data that is consumed by a function, our third component.
When the function receives the key and the secret, the function uses the key to change the data in the secret, to create the fourth and final component, which is known as the cipher.
And the cipher is simply the encrypted message, the th= ing that, if it were intercepted, if it were seen by anybody else, any non-participants or bad actors, they wouldn't know what the secret was, they wouldn't know what the message was, and they wouldn't know how to decrypt t= hat cipher back into the secret.
Now again, most cryptographic functions are two-way, m= eaning it doesn't do me a lot of good to encrypt data if the receiving party at the other end can't decrypt it.
And oftentimes, all this involves is using the same ke= y or a reverse key into the same function, with the cipher's input to get the secr= et back out.
So, when we talk about cryptography, keep in mind thos= e four basic components: the secret, the key, the function, and the cipher.
Then, understand that cryptographic hashing is a very special class of cryptographic functions, which, unlike all their cousins, = are only one way, meaning that in a cryptographic hash I can put information or= a secret into it, the key and the function are contained as one entity, and w= hat I get back out is encoded data.
I get what's called a hash or a hash result, that is an encryption based on the data that I put in.
That is mathematically impossible to reverse-engineer = and this is what makes it a one-way function.
If you put any data into a cryptographic hash and you = share that hash with me, there's absolutely nothing I can do above and beyond ran= dom guessing to try and recreate that input to tell me what your original secret was.
Cryptographic hashes are used in scenarios where we wa= nt to prove a piece of data without sharing that data.
So, password management systems use this all the time.=
We don't want to store a username and password, we want to store a username and the hash output of a password.
That way, I don't know what any of my users' passwords= are, but I do know that if they put the wrong password in, they're going to get = the wrong hash back out, and I can easily validate that a user's password is correct or incorrect, without having to know what it is.
We're gonna dive in a lot = deeper in a later module, to show you exactly through a demo how cryptographic has= hing works, and how it provides security and immutability on the blockchain.
But just understand these two big takeaways:
Number one, that cryptography is normally a two-way fu= nction with four components: the secret, the key, the function, and the cipher, and then finally, there are a subclass of cryptographic functions called crypto= graphic hash functions, which exist as one-way functions, which can only encrypt the secret, and again, which are mathematically impossible to decrypt the secre= t in any other method other than randomly guessing input until you're able to recreate that hash output.
These are key components which enable security and immutability on the blockchain.
What is a cryptographic function?
§&nb= sp; A function for encoding or encrypting data to protect the contents from adversaries.
Simple example function:
§&nb= sp; Secret =3D "Blockchain Training Alliance"
§&nb= sp; Function =3D Swap each letter in the secret with a new letter according to the Key= p>
§&nb= sp; Key =3D "+2"
§&nb=
sp; Cipher
=3D "Dnqemejckp Vtckp=
cpi
Cnnkcpeg".
As you start to get more and more into blockchain, one= term that you're gonna hear a lot is Byzantine Fault Tolerance.
And if you're wondering what that means, that very str= ange, cryptic sounding term, that can be explained with a story.
In 1982, a mathematical problem was formulated called = the Byzantine Generals Problem, and without getting too detailed into the mathematics behind it, essentially, with the Byzantine Generals Problem was= a story about two empires fighting a battle.
One Empire exists within the confines of a walled city= , the second Empire has several generals surrounding that walled city, each with their armies waiting to attack.
And the balance of power is very, very evenly matched between these two empires.
And it is such that if all the generals agree to attac= k at the same time, they will have enough power to overcome the empire in the ci= ty and win the campaign.
If they, for whatever reason, they're not able to coor= dinate their attacks simultaneously, and even one general misses the message, well then, the Empire surrounding the walled city is going to lose the campaign = and the war.
So, the Byzantine Generals Problem explored a really k= ey area of cryptography, in fact, the heart of what cryptography is, which is = how do I exchange messages with someone in an environment where they may become= corrupt.
You have to understand the only way these generals had= to communicate was to send a disguised messenger through the city with a messa= ge to deliver to the other generals, and so, this always posed the risk, if yo= u're a general and you're getting amessage from one = of these messengers, how do you know or how can you believe with greater than random certainty that the message you're getting is reliable and it hasn't = been tampered with.
And this, again, was a problem that was postulated bac= k in 1982 and went unsolved until 2008, when the anonymous Satoshi Nakamoto prop= osed a solution to this problem.
Essentially, what the solution entails is all of the generals hiring as many mathematicians as they can.
When we talk about Byzantine Fault Tolerance, we're ta= lking about the generals having more access, having more mathematicians, or more computing power on their side than the empire within the city.
So, if I'm the generals and I can hire more mathematic= ians, then that means that I can encrypt my messages going through the city with greater and greater complexity, and if the balance of power becomes greatly tipped in the favor of the generals outside the city, they can use encrypti= on methods which are so complex, that there really is no real chance, or a very small chance that any of the mathematicians inside the city will be able to intercept that message, decrypt it, change the contents, re-encrypt it, and= do so in a time quick enough that the generals don't notice anything has happe= ned.
And so, this is Byzantine Fault Tolerance.
This is the fault tolerance mechanism that we see used= in most public blockchain solutions right now, including Bitcoin, including Ethereum, although Ethereum is working on transitioning to a system called Proof of Stake, which we'll talk about in a later section.
But, when you hear Byzantine Fault Tolerance, often abbreviated as BFT, all we're talking about is this idea that blockchains become secure if they have more computing power, more hash power in the cha= in than off the chain.
So, solutions like Ethereum, 16,000 plus nodes, or Bit= coin, the largest blockchain network that there is, with over 30,000 nodes, offer= us a high degree of security and immutability, because the computing power on those networks is so great that there's really no reasonable chance that an adversary could ever control as much or more computing power to attack the = data on that blockchain.
And if someone ever were to, chances are the economics behind it would be such that they would spend more to simultaneously harness all that computing power, than they could possibly stand to gain.
And so, this is Byzantine Fault Tolerance.
It is the root of cryptography, which is simply the st= udy of how do we send information back and forth securely in the presence of adversaries and bad actors, and it's what underlies all the security and immutability that we get in blockchain.
Blockchain makes use of several different types of cryptography. Among these are:
§ Public
Key Cryptography
Pair of public and private keys used for encryption and digital signatu=
res.
§ Zero-Knowledge
Proof
Prove knowledge of a secret without revealing it.
§ Hash
Functions
One-way pseudo-random mathematical functions and Merkle trees.
Public key cryptography uses a pair of a public key an= d a private key to perform different tasks. Public keys are widely distributed, while private keys are kept secret.
Using a person's public key, it is possible to encrypt= a message so that only the person with the private key can decrypt and read i= t. Using a private key, a digital signature can be created so that anyone with= the corresponding public key can verify that the message was created by the own= er of the private key and was not modified since.
Blockchain makes extensive use of public key cryptogra= phy.
So, I want to talk a little bit about cryptography and= some cryptography principles.
The first is easy and hard problems, and this is reall= y what public - private key cryptography is based off of.
There are some problems that are very easy one way, but difficult another way.
And a great example of this is multiplication.
So, if I give you a pen and paper and a lot of time, I= can ask you to multiply any two numbers, and you can probably come up with an answer fairly easily.
What's a lot more difficult is if I give you the produ= ct of two numbers and ask you to factor that and find out all the numbers you can multiply together to get that result, that's a much harder problem.
This is how public - private key cryptography works.= p>
We use an easy mathematical problem to generate a mess= age, but we make it very, very hard for that message to be decrypted by someone = who shouldn't decrypt it, and public and private keys play a big role in blockchain.
I want to show you right now.
I've got two different wallets. I've got a wallet that you're probably used to, that you keep money in, and then I've got a hardwa= re wallet, a digital wallet that you'd use to trade something like bitcoin or = ether.
Now, what you're used to, in your regular wallet, is p= utting money in here and you keep your money in here, and if you lose this, whoever finds it gets your money and they get to spend it.
In blockchain, with cryptocurrencies, it's a little bit different.
The only thing that ever gets kept in here is your pri= vate key.
And a private key - public key work together so that I= can use a private key to sign, digitally sign, any message.
You can then take the public key, which anyone can kno= w, and use that to verify that my specific private key was the one that actually signed that message.
And so, you can know without a doubt that I'm the one = who created that message, that no one was pretending to be me sending this mess= age.
And this is how it works trading digital currencies ba= ck and forth.
If I decide I'm going to pay you three bitcoins and I'= m gonna do it out of this hardware wallet or any softwa= re wallet, any kind of digital currency, the only thing that's kept on this de= vice is my private key and it never leaves, and so, that means if I want to send= you some money, all I'm doing is accessing the private key on this device to si= gn a message that gets transmitted to the blockchain, that says I'm paying you s= ome bitcoin or some ether or some litecoin, and my = public key is used to verify that that message actually did come from the wallet t= hat says it did.
And this is how we trade cryptocurrencies back and for= th, and that's what makes the concept of a digital wallet a little bit different.= p>
If I happen to lose this, I haven't lost the money tha= t's in it, because there's no money ever in it.
All that money is is just = a record on the blockchain, and, as long as I can recover that private key somehow, I can just get a new device, start using my private key again and keep right = on trading.
So, that's how public and private keys fit into blockc= hain; a very key component just to understand that they're used to sign and verify any transactions that you make.
Zero-knowledge proof is the ability to prove a secret without reveali= ng what the secret is.
Let's review an example: Let's say there are two toy c= ars, identical in shape and size, except, one is red and one is blue. Jerry, who= is color-blind, holds the toy cars behind his back. Jerry then shows one of the cars to Sam. Jerry then hides that car behind his back and shows Sam the ot= her car. Sam can consistently detect the switch because the cars are different colors, but he never has to reveal the color of the cars to Jerry in order = to prove the secret.
In this section, we're going to talk about a cybersecu= rity idea in blockchain known as "Zero-Knowledge Proofs".
Zero-Knowledge Proofs are exactly what the name implie= s - they allow me to prove to another party that I have a certain piece of knowledge without revealing what that knowledge is.
Zero-Knowledge Proofs are often referred to as zk-SNARKs, which stand for "Zero-Knowledge Succi= nct Non-Interactive Arguments of Knowledge", or zk-SNARKs for short, or, if you want to be simple, we can just call them Zero-Knowled= ge Proofs.
A great example of a Zero-Knowledge Proof is what we c= all the cave door analogy.
Pretend that there's a circular cave, with only one en= trance or exit and at the back of this circular cave there's a door which can be unlocked using a secret code entered onto a keypad.
If I want to prove to you that I know the unlock code without revealing that unlock code to you, all I need to show is that I can walk into one end of the cave, open the door, and come out the other end.= p>
If I've successfully demonstrated that, then you know without a doubt I've been able to unlock that door, but yet I haven't revea= led that unlock code to you.
This simple cave door analogy is a Zero-Knowledge proo= f, and if you can remember this cave door analogy, then you'll understand why Zero-Knowledge Proofs are so important in blockchain.
For example, a user may make a request to send another= user some money.
The blockchain naturally wants to make sure, before it commits this transaction, that the user sending the money has enough to sen= d.
However, the blockchain doesn't really need to know or= care who is spending the money, or how much total money they have.
Being able to answer a question of "Does a user h= ave enough money to send to another user" without knowing who the user is,= or exactly how much they have, is one of the primary use cases for Zero-Knowle= dge Proofs in blockchain.
So, when you hear about zk= -SNARKs, don't get intimidated.
It's not a complex idea. Just think of Zero-Knowledge = Proofs and the cave door, think about how important it is in blockchain to be able= to prove a claim without actually revealing the information behind that claim,= and you'll understand Zero-Knowledge Proofs.
Finally, hash functions feature heavily in blockc= hain. A hash function is a mathematical equation with four important properties:<= /p>
§ Hash functions can take anything as input and create an output with a fixed size. This makes it possible to condense anything into a piece of data of a fixed size and is how messages are condensed for digital signatures.
§ Its easy to calculate a hash, but hard to determine a hash input from the outpu= t. The best option is to keep trying inputs until one produces the desired out= put.
§ Inputs that differ by a single bit produce hashes that differ by half of their bit= s on average. This prevents someone from finding a desired hash input using a h= ill climbing.
§ It is infeasible to find two inputs that produce the same output when hashed. Since a hash can take any input and produce a fixed output, it makes sense = that multiple different inputs will create the same output. A good hash function will make it so that you have to try a large number of inputs before finding two that produce the same output.
In this section, we're going to talk about cryptograph= ic hashing.
A cryptographic hash is a special kind of cryptographic function known as a one-way function, whereas most cryptographic functions = are two-way, meaning that data cannot only be encrypted, but can be decrypted at the other end.
Hashes, or cryptographic hashes, are very unique in th= at once data is encoded, it can never be decoded.
Let's look at a small example of this.
If we take a simple sentence, "Let's eat, grandma= !", this input sentence will generate a unique 32-character hash output.
This hash output can be thought of as an identifier fo= r this input data.
In other words, I can input this data into a hash func= tion to generate this output, and I can share this output with anybody, anywhere= , safe in the knowledge that it is mathematically impossible for anyone to reverse-engineer the original input from this hash output.
In fact, the only possible way that anybody could ever determine what this input was, was by randomly inputting data into a hash function until they were able to recreate the same output.
Another unique function of a cryptographic hash is tha= t any small change to a dataset, no matter how small, will result in an entirely different hash.
If I remove the comma from this sentence, not only do I entirely change the meaning of the sentence,
I also generate a new 32-character hash output.
This 32 character hash outp= ut remains a fixed length no matter how big the input dataset is.
To demonstrate this, let's take the entire first book = of Tolstoy's War and Peace, and paste it into our hash function.
You'll see that the most time-consuming part of this i= s not generating the hash, but simply moving all the data from the clipboard into= the input text box.
I've generated a unique 32-character output or identif= ier for this input text.
You'll notice that this is the same length hash that I= got when I had a short one sentence input, and if I change anything in this extremely large dataset, even one character, I will generate an entirely new hash output.
Let's take a look at this by removing the period at th= e end of this sentence, and replacing it with a question mark.
You'll see that by doing so, I've generated a complete= ly different and unique 32-character hash output.
Hash functions not only play a critical role in blockc= hain security by enabling blocks to be linked together in creating immutability between data on the blocks, they can also be used as a great way to identify and verify large sources of data.
Let's look at some other use cases.
If I want to build a system which authenticates users,= but I don't want to store their password directly in a database where it might be stolen or corrupted, a hash function can be a great solution.
Let's say I have a very simple password, password123, = but I don't want to store that password inside my authentication database.
I can simply ask the user to type in their password and store the hash output from that password.
Any subsequent time a user tries to log on, I don't ne= ed to know their password. I just need to verify that they're able to recreate th= is hash output.
If they can't do that, because they have the wrong pas= sword, then I can simply choose not to authenticate them into my system.
Cryptographic hashes can also be used to validate sour= ce code or real large datasets in the real world.
Let's look at self-driving cars for an example.
Let's say we've developed a self-driving car with the intelligence to hash the source code every time it starts up.
My self-driving car, every time I start the car, can t= ake its source code, run it through a hash and generate a unique identifier.
It can then share this identifier or 32-character hash output with every other self-driving car it has contact with, or even valid= ate this against a database or some other centralized data store, or perhaps an immutable record on the blockchain.
This gives me the confidence that if the source code f= or my self-driving car ever gets hacked and makes it unsafe to drive, I'll know it right away. I'll try to start my self-driving car, which will immediately h= ash its source code, share that hash output with other self-driving cars or validate it against an authoritative source, and instantly we can see I've = got an entirely different hash output letting me know before I've gone anywhere= that my self-driving car is not safe, and putting that self-driving car into a l= imp or shutdown mode, where it simply refuses to go anywhere until the compromi= sed software has been updated and replaced with the right version.
Cryptographic hashes give us a way to link all blocks = on the blockchain together in an immutable fashion, such that if any one particular block or the data on any block is changed or altered to any degree, no matt= er how small, we will know it instantly and we will break the link between that block and every subsequent block.
If you haven't watched the module in this course that = covers the in-depth walkthrough of Proof of Work consensus, you might want to chec= k it out now.
We actually show how cryptographic hashing is used to = link together all blocks on the blockchain, creating a data store that is immuta= ble, secure, and extremely trustworthy.
Next, let's engage
with an interactive lab. This lab is an actual hands-on demonstration =
of
taking data and creating a hash output. Enjoy!
https://blockchaintrainingalliance.com/pages/lab-hash<= /p>
A special type of data storage structure based on hash functions is called a Merkle tree:
§ It is structured as a binary tree; the leaves contain the values to be stored = and each internal node is the hash of its two children.
§ It provides efficient lookups and protection against forgery since verifying a= transaction is included in the tree. Can be accomplished by sending only the transactio= n, the hash contained in each node between the transaction leaf node and the r= oot, and the hash values used to create each hash sent.
§ Looking up a transaction in a Merkle tree with three levels includes sending two transactions (the desired one and the other child of its parent) and three hashes (the transactions parent, the root, and the roots other child).
Blockchains use Merkle trees for fast and efficient validation of data.
Merkle trees summarize the entire set of data in a blo= ck by creating a root hash of that data.
A root hash is created by repeatedly hashing pairs of = child nodes until only one node is left.
Let's take a look at a diagram of a Merkle tree.
This diagram consists of four transactions represented= as transaction "A", transaction "B", "C" and "D".
The transaction data is then hashed and the resulting = hashes are stored in leaf nodes represented as H of "A", "B", "C" and "D".
Nodes are repeatedly hashed in pairs and the resulting hashes are stored in child nodes until only one node remains: the Merkle ro= ot or root hash.
The reason you wouldn't want to hash the entire set of= data as a string is because it's not efficient when validating transactions.
In this example, if Alice needed to show Bob that this transaction was valid, let's say transaction "C", Alice would nee= d to send the entire list of data to validate the block.
But when using a Merkle tree, Alice only needs to send= the nodes that contain the transaction that she is looking to validate.
Let's say Alice wants to validate transaction "F&= quot;.
Alice would only need to send the data of transaction "F" and four hash values to Bob.
Bob would then calculate the hash value based on the g= iven information.
And if the root matches the block, the transaction can= be assumed to be valid.
Merkle trees allow for validation of a specific transa= ction without requiring the entire set of data.
Ethereum and Hyperledger Fabric are two blockchain sys= tems that are taking different approaches to moving business to the blockchain. = On the next few pages, we will compare how Ethereum and Hyperledger Fabric make use of:
§ Public key cryptography
§ Zero-knowledge proofs
§ Hash functions
The use of public keys for identity management is a lo= gical choice since knowledge of a public key is necessary for verification of dig= ital signatures. Both Ethereum and Hyperledger Fabric use digital signatures on transactions and blocks to verify the identity of the creator and that the signed data has not been modified since signing. Public key cryptography is used in the blockchain as a method for managing users identities without revealing real world identities.
In Ethereum, users are identified by an address that is directly related to the user's public key. This provides identity verificat= ion while preserving anonymity.
In Hyperledger Fabric, users are identified via X.509 certificates. These certificates provide several pieces of information about the user, but one of these is also the user's public key.
Zero-knowledge proofs are a cryptographic principle us= ed in some blockchains to increase the privacy of users. Currently, Ethereum does= not have support for zero-knowledge proofs, but adding the necessary functional= ity for zkSNARKS, a type of zero-knowledge proof, is currently included in the Ethereum development roadmap. Hyperledger Fabric = does not currently support zero-knowledge proofs as a privacy feature.
Hash functions are at the core of all blockchain techn= ology. One of the primary uses for hash functions is ch= aining blocks together. In both Ethereum and Hyperledger Fabric, blocks include the hash of the previous block to tie the blockchain into a cohesive whole.
Merkle trees are a data structure that allows authenti= cated storage with efficient data retrieval. Both Ethereum and Hyperledger Fabric= are smart contract platforms that use a particular type of Merkle tree called t= he Patricia tree to store the current state of their virtual machine.
Hash functions are used as the cryptographic puzzle at=
the
center of the Proof of Work consensus algorithm. Ethereum currently uses Pr=
oof
of Work for consensus, though a switch to Proof of Stake has been built into
the road map from the beginning. There are only two consensus algorithms
implemented in Hyperledger Fabric - Solo and Kafka. SOLO is for development=
and
Kafka is for production.
By the end of this section, you should be able to:
§ Outline the advantages of transparency.
§ Discuss how a blockchain utilizes transparency.
Now, that we have an understanding of how collaboratio= n and cryptography work together to create a layer of trust, let's discuss how blockchain has a powerful disintermediation effect.
Nodes on the network are allowed to place data directl= y onto the database that is shared.
This eliminates the need for an intermediary to do such task.
As we discussed, developers can create a distributed l= edger on a blockchain, and use cryptography to give people secure storage space on that ledger.
This creates a very different world than what we have = come to know today, because for the first time in the digital world, people are allowed to own their own data.
You may be asking yourself: "How is this differen= t from the current technology?".
Today, organizations use our data, sell our data, stor= e our data, and exchange our data.
Data is an extremely powerful asset and to own your ow= n data is a vast change to the current system.
In a world powered by blockchain, having ownership of = your database is truly empowering.
You can now share the information that you choose with= any organization that you desire.
The power of blockchain and owning your own data is the ability to transact peer-to-peer.
With the current system of intermediaries, when you go= out to eat at a restaurant, and you pay with your credit or debit card, you're = not paying the restaurant directly.
Instead, a database record at your bank is being debit= ed and the database record at their bank is being credited.
In this example, the value and data in the database be= long to the intermediary, and not the individual.
You are then dependent upon them to secure and validat= e your transaction, which shifts the power to the intermediary.
But in a blockchain world, the individual has their own ledger record, and the secure key that allows them to access it.
You no longer need an intermediary.
A transaction is simply debited from your record and credited directly to somebody else's record.
Blockchain allows you to have the power to control mor= e than financial transactions.
Later, we'll take a deeper dive into how the healthcare industry may utilize blockchain to allow people to own their own health records.
And with blockchain, you can determine who can access = those records.
We talked about how cryptography and collaboration cre= ate trust.
Now, let's examine how peer-to-peer transactions with blockchain create transparency which can lead to even another layer of trus= t.
This layer of trust can aid to curb corruption and even create cost savings.
Currently, the data and records owned at centralized o= rganizations are stored and hidden within a database.
These databases for the most part = are inaccessible and do not communicate in an effective manner with other syste= ms.
This also makes it easier for a corrupt individual or persons within the centralized organization to manipulate these records.
Because of the possibility for manipulation and foul p= lay, there are many flawed and expensive safeguards put into place.
These safeguards are done through regulations and legal requirements creating expensive overhead and delays.
Besides the mounting cost to safeguard these internall= y, there are also many necessary safeguards from external forces, because they= are individual points of critical data storage, bad actors have to identify only one point of failure to access.
The combination of one central point of storage and the storage of valuable data make these centralized databases a very enticing target for malicious persons.
With blockchain, these malicious actors would have to identify and target numerous points of failure until they control more than= 51% or what's known as consensus.
In most blockchains, it could be up to hundreds of tho= usands of points of weakness that would have to be exposed to be corrupted.
It's nearly an insurmountable task.
Not only must a centralized organization worry about b= ad actors, but they must do so, while still allowing access and synchronizing = with other centralized organizations.
Having to constantly update and synchronize data acros= s many centralized databases is not efficient.
The cost is high and the vulnerability to bad actors is amplified.
All the more reason blockchain solutions are so exciti= ng.
Blockchain offers efficiency. It also creates trust and financial benefit through transparency, security, immutability, and accessibility through ownership.
Traditional databases=
using
the CRUD update model have four main operations:
Traditional databases do not retain historical informa= tion:
§&nb= sp; Only the most recent versions of each value are visible.
§&nb= sp; Deleted values are not visible in the database.
This limits the transparency of data contained in the database:
§ Values can be modified or deleted after creation.
The CRUD update model of databases allows data to be c= hanged or removed from the database. This means that the visible data in a databas= e is not an accurate historical record of the database. The existence of an Upda= te operation means that each value in the database is only the most recent ver= sion of that value and could have had different values in the past. The Delete operation means that values can be removed from the database.
This limits the transparency of data in the database s= ince values can be modified or deleted after creation.
The blockchain is designed to be a data structure that= only allows appending:
§ The past history of the blockchain is visible and immutable.
§ Updates to the blockchain can be performed by including them in new blocks added to= the blockchain.
The blockchain is designed as a data structure where e= ach block in the chain locks in the value of the previous block and so on, back= to the first or genesis block. This means that the blockchain= is an append-only data structure without support for modification or deletion.=
The entire history of the blockchain is publicly visib= le and stored in a distributed and decentralized fashion. Values in the blockchain= can be updated by appending a new version of that value in a later block, but= the complete history of the value is preserved.
The blockchain is des= igned so that its entire history is visible and unchangeable. Transactions in t= he blockchain cannot be modified after creation, and their complete history is publicly visible. This means that the blockchain is a completely transparent data structure with the useful property that the integrity of the blockchai= n is easily verifiable by any user.
Traditional databases and the blockchain were created = for different purposes and have different levels of transparency. Traditional databases have low transparency since values can be modified or deleted; however, this changeability allows them to store data in an efficient manne= r, with only the most relevant versions of each value retained in storage.
The blockchain is publicly visible and immutable, mean= ing that it has very high transparency. Its append-o= nly structure and decentralized storage sacrifice storage efficiency for trustw= orthiness of the stored data.
One of the big benefits we get in any blockchain solut= ion, public or private, is the idea of transparency.
In a public blockchain solution like Bitcoin or Ethere= um, because they're anonymous and we have no concept of identity, we have no wa= y of treating users differently.
And so, all data on a public blockchain is transparent= and visible to all other participants.
And this is really important. It adds a lot of value, = when we're talking about exchanging currency or tokens of monetary value, becaus= e as long as we can protect the anonymity of the participants, it gives us a gre= at way for anybody to validate the details of any transaction on a ledger that= is immutable, permanent, can't be changed and offers a high degree of trust.= p>
This also has a lot of other really interesting potent= ial use cases that we're starting to explore with public blockchain technology,= voting and voter registration, tracking election results.
These kinds of things are really, really great use cas= es for having that level of public transparency.
On public blockchains, there's another kind of transpa= rency, which adds a lot of value as well, and that is full transparency into the s= mart contracts that execute on that blockchain.
These, oftentimes, are smart contracts which have the potential of working with other people's money, sometimes large amounts of other people's money, and if you're going to entrust your hard-earned money into someone else's smart contract, it's really nice to have the ability to= be able to go and review the source code of that smart contract, either yourse= lf or by hiring a developer to audit that smart contract, to make sure it's written fair, that there are no security vulnerabilities, and that it does = what it claims to do.
On the private blockchain side, what we have [is] permissioning.
And we can control how open or closed our data is.
We still have a lot of benefits of being able to share= data in shared infrastructure that private blockchain creates.
There are a lot of business networks and value chain relationships where the participants would love to be able to share more da= ta and more information with consumers about the business processes and the steps = that go into delivering the goods and services we consume.
What has traditionally prevented solutions like this i= s the lack of any kind of shared infrastructure.
While technically conventional technology may be able = to address these concerns, it is oftentimes human beings not being able to com= e to consensus on questions of who owns the platform, who builds the platform, w= ho maintains the platform.
And, if a participant leaves the ecosystem, do they ta= ke all or part of the platform with them.
That have prevented us from using conventional technol= ogy in these respects.
Using private blockchain solutions like Hyperledger, c= an help alleviate many of these concerns and create a truly shared technical infrastructure between organizations.
This allows participants in a supply chain or value ch= ain to track data and to share that data about how goods and services are produced= , created, consumed, and distributed into the open market, that we haven't really been able to do practically before.
It's estimated that over 1/3 of the food we produce go= es to waste, because we don't have this kind of clarity into our supply chain with food or into the supply chain with other types of products.
Think about if a meat gets recalled because it might be contaminated, how much perfectly good meat gets thrown away just to err on = the side of caution.
Where if we just had greater resolution and visibility= into where that product originated from and how it went all the way from product= ion to our plate.
Then, we could issue more accurate recalls and reduce = the amount of food waste.
Consumers might value your product more, your offering more, if they're able to see where it comes from.
If you're manufacturing and distributing clothing, and= you can demonstrate to consumers that all of that clothing was sourced from par= ts of the world with fair labor practices consumers are going to have more tru= st and faith in the brand and ultimately willing to pay a higher price for it.=
These kind of transparency solutions are one of the bi= ggest benefits of blockchain and one of the areas being most explored, because ri= ght now there are a lot of consumers who would simply like more visibility into= the products and services they purchase.
And blockchain, both public and private, can be a great solution for doing that.
By the end of this section, you should be able to:
§ Explain what it means to be immutable and how blockchain is immutable.
§ Outline the advantages of immutability.
§ Discuss how chaining provides immutability.
Blockchain is designed to be an authoritative ledger o= f the history of the network.
This history may include financial transactions and bu= siness agreements where modifications to the ledger may have wide-reaching business impacts. Blockchain is based on an untrusted network, so trust that the blockchain has not been modified needs to arise from the structure of the blockchain itself, rather than from trust in the organization storing a cer= tain copy.
So, one of the big benefits of blockchain is what's kn= own as immutability.
The idea that once a record gets committed to the bloc= kchain or to the ledger, it's there permanently.
In blockchain, it's a little bit different than a data= base, and we'll talk about this in another module, in a lot more depth, but in a traditional database we're used to being able to edit records and delete records, and that's not the case in a blockchain.
In a blockchain, there are only two possible operation= s: we can create a new record, and we can go back and we can read existing record= s.
And this contributes to this idea of immutability - on= ce data is written to the blockchain it can't be edited, it can't be deleted.<= /p>
All you can do is add another record to the blockchain indicating that something about that data has changed.
This immutability is what makes blockchain such a secu= re solution, and it's what makes it a trustless solution.
Meaning, I don't have to trust anybody that I'm intera= cting with and trading with, as long as we both trust in the blockchain and the d= ata on the blockchain.
Then, we can transact back and forth seamlessly.
The way immutability works is blockchain is, by design= , a very, very inefficient solution.
We are asking a large number of nodes, all the nodes o= n a network, to perform exactly the same work as every other node.
So, essentially, we are duplicating work over and over= and over again.
The reason we do this, is because the only way to potentially change data on a blockchain, is by changing the record on that blockchain for 51% or more of the nodes, or the miners, or the participants trying to come to consensus on the blockchain.
And when you get to very, very large-scale networks, Ethereum with its 16,000 plus nodes, Bitcoin with over 30,000 nodes, this becomes a very, very, very tall order.
Trying to hack or change a record on over 15,000 of th= ose Bitcoin nodes would be quite a bit of work.
So, it's not impossible to change the record on a blockchain, but it is impossible from a practical standpoint.
Now, one thing that should be noted when we talk about immutability is: all that blockchain gives us is an accurate recording of w= hat was posted.
It is still up to whoever is posting that information = on the blockchain to make sure it's accurate and true.
In other words, blockchain doesn't do anything to vali= date that the information on it is correct.
All it validates is that that information hasn't been changed since it was originally written.
Another way to think about that is, I could post a rec= ord on blockchain that says: "The sky is orange".
That doesn't make the sky orange.
We all know the sky is blue. All that does is that mea= ns I can't ever come back later and claim I didn't say that or I said it was blu= e, and someone changed the record.
That immutability that blockchain gives us is that tha= t data was captured as it was originally written and hasn't been changed.
Another part of this immutability is cryptographic has= hing, and the way that we chain all these blocks together.
If you haven't watched the module on Proof of Work, I = would suggest you go watch that now, to see a really in-depth overview, a hands-on demo of how blocks are actually linked together in such a way.
And, if I ever went back and tried to change any infor= mation or prior transaction on the blockchain, I would break that chaining in a ve= ry obvious way that anyone would immediately spot if they came and queried that data o= ff the blockchain.
So, when you hear about immutability, just understand = that all we're talking about is the virtual impossibility of anyone ever being a= ble to come along and change any data on the blockchain.
And also, along with that, understand that we only hav= e two possible operations on blockchain: we can only read data and we can only add new data.
There's no concept of an edit or delete, and this is w= hat we talk about when we talk about immutability on the blockchain.
The blockchain needs to be immutable. If someone can c= hange the blockchain after the fact, then it is no longer a trusted historical ledger. The blockchain is designed so that immutability is cumulative; each piece is linked to every other piece, creating a cohesive whole that is more difficult for an attacker to modify.
§&nb= sp; At the bottom level, transactions are digitally signed by their creators. An attacker cant forge a transaction unless they steal a private key.
§&nb= sp; A block structure is predefined. Attackers cant modify it to suit their purposes.
§&nb= sp; The chain part of the blockchain is achieved using hash functions. Each block includes the hash of the previous block, creating a clear link between each block in the blockchain.
§&nb= sp; Each block is digitally signed by its creator. The creator is selected through t= he blockchains consensus protocol, making it difficult for an attacker to be a legitimate creator.
All four of these features help to make the blockchain resistant against changes occurring after the fact.
Each transaction cannot be forged or modified because = it is mathematically infeasible to forge a digital signature. The structure = of blocks is publicly defined, and invalid blocks will be publicly rejected.= p>
Each block locks in the value of previous blocks by including their hash. Attackers cannot find another block that will produce= the same hash.
A block cannot be forged or modified, because it is di= gitally signed by the creator. The creator of a block is either publicly known (Pro= of of Stake) or difficult to become (Proof of Work), making masquerading as the real creator difficult or impossible.
Now, lets take a moment to discuss how each of the fe= atures mentioned contribute to the immutability of the blockchain.
At the bottom level, each transaction is digitally sig= ned. This means two things about transactions:
§ Existing transactions cant be changed after the fact, because the signature will no= longer match.
§ Fake transactions cant be created since an attacker cant create a valid digital signature for a transaction between other parties.
Both of these contribute to the immutability of the blockchain since they limit the range of transactions that an attacker has = to work with if he wants to create a fake but valid blockchain.
Next, the block structure is publicly defined in the protocol. This limits the types of modifications that an attacker can make = to a block when trying to modify the blockchain.
Third, each block contains the hash of the previous bl= ock. This is what ties the blocks of the chain together. Remember from earlier t= hat one of the properties of a hash function is that it is extremely difficult = to find two inputs to a hash function that create the same output. Since a blo= ck contains the hash of the previous block, its difficult to find a different version of the ledgers history that matches the most recent block, as that would require finding two different versions of the previous block that have the same hash.
Finally, each block is digitally signed by its creator. Since the creator of a block is selected via a consensus algorithm, its difficult for an attacker to become the legitimate creator of a given block= . If an attacker is not the legitimate creator of a block, its impossible for t= hem to create a digital signature that others would accept.
Specific Immutability Mechanisms
Now, lets look at how different blockchains implement immutability.
In Ethereum and Hyperledger, the immutability mechanis= m is the one that weve described previously. Each transaction and block is digitally signed and are linked using cryptographic hashes.
Corda, on the other hand, relies on its notary service= for immutability. Each Corda network has one or more notary services that verify transactions. Each transaction is considered separately and, if approved, is signed by the notary service. Transactions signed by a notary are finalized= and cannot be modified after the fact.
It is important to understand the value of locking in = the previous block by including its hash in the next block.
Creating a ledger of transactions with blocks that ref= er to previous blocks is a much better idea than numbering the blocks sequentiall= y.
In a book with pages, 1, 2, 3, etc., it would be easy = to tear out page 25 and replace it with another page.
The integrity of the book has been manipulated and alt= ered. However, there is nothing about the new page number that ties it (chai= ns it) to the content of the previous page.
Instead, in a blockchain, blocks are referenced by their hash and each block explicitly specifies which block (hash) it is building on.
On the next page, we will take a look at how these blocks and hashes look in an actual example.
We will cover the Pro=
of of
Work in a later module. However, this demo uses the Proof of Work to show h=
ow
blocks are chained together and how tampering with information in a past bl=
ock
destroys the integrity of the proceeding blocks.
In this section, we're going to talk about Proof of Wo= rk consensus, and how Proof of Work consensus is used to create an immutable c= hain of block data on the blockchain.
Let's take a small example. Let's say we have some blo= ck data and, in the interest of simplicity, we will keep this very, very short= .
But understand that in real life a block will most lik= ely contain many more than just three transactions.
But on this block, we have a full block consisting of = three transactions.
When it's time to validate a full block, all nodes on = the network will start to guess a nonce value.
What we're looking for is a nonce value such that when= we take our input transaction data and we combine it with a nonce value, we ge= t a hash output that matches the difficulty.
In this case, the difficulty is a hash output that beg= ins with four leading zeros.
Every node on the network will guess a different nonce randomly until they happen to find one that matches the difficulty.
So, our node may start off by guessing "123"= , and we see that that does not produce a hash output that matches the difficulty= of four leading zeros.
Let's try again. Let's try "973321". Once ag= ain, that does not give us a hash output that matches the desired difficulty.
[So], rather than guess over and over and over, let's = go ahead and ask a computer to do our work for us.
The computer is now guessing different nonce values ra= ndomly until it happens to guess "22294", which you see produces a hash = that begins with four leading zeros.
Because this hash is the output of input to a hash fun= ction consisting not only of the transaction data, but also of the nonce, changing either one will result in a new hash output which does not match the difficulty.
If I change "22294" to "22295", yo= u'll see I get a hash output which no longer meets the difficulty criteria.
However, if I change any of my transaction data, I'm a= lso altering the input to the hash function, and thus generating an output whic= h is completely different from the desired outcome.
In this way, nodes or miners on a network can validate= they have the same transaction data.
If we all start randomly guessing nonce values for thi= s set of data and my node guesses "22294" first, all it has to do is si= mply share this nonce value with every other node on the network.
Each node can then try this value "22294" on= their copy of the transaction data.
If any of the data has been altered or changed in any = way, no matter how insignificant, or the node in question simply did not record = the data correctly, this nonce value will not work for them.
For example, if we change "4.2 bitcoin" to "4.9 bitcoin", you'll see that the proposed nonce does not work.<= /p>
In this way, all nodes can come to consensus or agreem= ent on what the right set of transaction data should be.
When a node thinks it's guessed the right nonce, it si= mply shares that value with the rest of the network.
If the majority of the network, 51% or more, agree wit= h this nonce, because they have the same transaction data on their copy of the blo= ck, then the miner who guessed this number first, will be rewarded and the network w= ill come to consensus or agree that this is the correct version of the block da= ta.
Any nodes which have different data for the current bl= ock will then discard the copy of the current block they have and replace it wi= th a copy that the rest of the network has agreed upon.
This method is used to create blocks of data chained together.
So, let's say, that we have some transaction data here= on the blockchain.
We're gonna go ahead and m= ine our first block.
Now, you'll notice what we've added in this demo is th= e hash of the previous block, which is something we store in the header of every b= lock on the blockchain.
Because this is the first block, I simply get a previo= us hash value of zero.
Combining zero with the current transaction data on the block and the proposed nonce gives me a hash that meets the output difficul= ty.
When it's time to validate the second block, the proce= ss repeats itself.
I simply take the hash of the previous block stored in= the header of the current block, combine it with the transaction data in the current block, and try to guess the correct nonce.
In this case, it's "12314"
As discussed in our video on cryptographic hashing, ch= anging any of the input data, no matter how slight, will result in an entirely different hash.
So, if I try and change "2.3" to "2.9&q= uot;, I no longer get an output which matches the current difficulty.
This new output is also reflected in the header of the= next subsequent block.
If I have a series of blocks that have all been mined = and linked together, then you can see that going and changing data on any block will break every subsequent block after it.
So, if I try to alter this record "David pays Cha= rlie 2.3 bitcoin" and I want to change it to "5.3 bitcoin", I cha= nge the hash output of the current block.
This is reflected in the current block and also in the= next block.
Now, the nonce proposed for the next block does not wo= rk when combined with that block's transaction data and with the hash of the previous block.
This means that if I want to alter data on the blockch= ain, not only do I need to remind the block that I changed the data on, I also n= eed to remind every subsequent block in the blockchain.
This is no trivial task when you consider that major blockchain such as Bitcoin and Ethereum contain millions of blocks.
And this process must be repeated on tens of thousands= of nodes worldwide in a very short amount of time.
This ability to link together blocks in an immutable f= ashion and to cause attackers to have to undertake so much work, repeated so many times is what gives blockchain its security and immutability.
I hope you've learned a little bit more about Proof of= Work consensus and how blocks on the blockchain are linked together through watc= hing this video.
Next, let's engage with an interactive lab. This = lab will give you the chance to examine blocks on the blockchain. Enjoy!
https://blockchaintrainingalliance.com/pages/lab-block= s
By the end of this section, you should be able to:
§&nb= sp; Explain what smart contracts are and how they work.
§&nb= sp; Discuss the benefits of using smart contracts.
When we make a transaction on the blockchain, understa= nd that there are only three types of transactions we can make.
It's what I refer to as the onion model of blockchain.=
And we're going start off with a very outer layer of t= hat onion.
The thing that most people are familiar with when they= get into blockchain.
The thing we do all the time when we trade cryptocurre= ncy back and forth.
That is two or more parties coming together and using = the blockchain to record an announcement of the exchange of monetary value.
So, we might use blockchain to record the fact that I = paid you three Bitcoin for your used car or I paid you twelve blockchain for your vacation home.
This is the model that many of us start off with in blockchain and again, it's the one that's most familiar and gets talked abo= ut the most right now.
But if we peel away that outer layer, and we take away= the idea of a monetary transaction or exchange, well, then we're left with two = or more parties using blockchain to record an important announcement.
And we see many valid use cases around this. Let's say= , that I go to the doctor for my annual physical.
My doctor checks me out and he says: "Hey Kris, I= want to put you on a new prescription for XYZ".
Well, maybe we're keeping our medical information on t= he blockchain, and so my doctor and I both agree that's a pretty good thing to= add to my medical record.
In this case, we still need two or more parties, becau= se it's very important that I, as a patient, don't have the ability to go and updat= e my own medical record without a licensed medical professional involved.
And it's also equally important that my doctor is not = able to update my medical record without my consent or permission.
And so, that's two or more parties coming together, recording an important announcement or important data point, but nowhere in that example has money or anything of monetary value exchanged hands.
Now, if we peel away the very last layer, you can take= away this idea of having to have two or more parties.
And what we're left with is just a single party announ= cing an important or significant event.
And this is the simplest type of blockchain transactio= n, and also the most powerful.
So, if we think about blockchain, perhaps for managing= a supply chain scenario, we might have a grower of organic produce announce or commit a record to the blockchain that says they've planted a crop.
And we might have an organic pesticide company come and treat that organic produce.
We still have a single organization or single entity m= aking the announcement of something they did, and this is really the heart of blockchain.
When you understand that it becomes really easy to understand where smart contracts fit in.
And smart contracts are just computer code. They're co= dified logic that we can use to respond to any kind of event that gets captured on= the blockchain.
So, in that organic produce example, if I want to noti= fy someone when that fresh produce has been treated with organic pesticide, so= I can create traceability for the end consumer, well, I might have a smart contract that manages that that defines the rules and the steps that get ta= ken when that particular type of event occurs.
And this is all smart contracts are.
There's oftentimes a misconception when people hear th= e word contract that they think of a legally binding agreement between two or more parties.
It's not necessarily the case. Smart contracts don't h= ave to be legally binding and they don't have to involve multiple parties.
In fact, if you come from a programming or development background you can think of a smart contract easily enough as a "class".
If you're not a programmer or don't come from a develo= ping background, you can just think of a smart contract as a set of rules that g= et executed every time a certain type of event happens.
And this is where the real power of blockchain comes i= n that not only do we have a permanent, unchangeable record of all the different events that have occurred, we can also write computer code, very, very non-subjective computer code, that defines exactly how that process is goin= g to be managed and what steps are going to be taken when that event occurs.
This allows us to ensure process consistency.
It allows us to ensure that processes that are normally fulfilled by intermediaries or middlemen can now be satisfied on their own without the need for human intervention.
And this leads to much more lean and efficient organiz= ations in way of organizing human effort.
So, when you hear smart contract just think about comp= uter code that you write to respond to certain types of significant events.
If you've ever worked with workflow or business process automation or management tools, you can think of smart contract is just bei= ng another workflow tool, albeit one that has the power to work with money.
So, don't get too intimidated when you hear smart cont= racts, and don't get too caught up in the language.
While they sometimes may be legally binding, they're n= ot necessarily legally binding in the same way a true contract is.
They're just a way for us to bake our own logic into b= lock chain solutions to ensure that consistency of execution.
§ Can also be known as chaincode program rules and decision points into blockchain transactions and processes.
§ Automate transactions and ensure they are all following the same rules.
§ Stored on the blockchain.
§ Address limitation of the Bitcoin protocol.
By the end of this section, you should be able to:
§ Compare blockchain security vs. standard security.
§ Compare security of public and private blockchains.
Blockchain is commonl= y called the future of computing. It takes a very different approach to data storage= and processing and requires a very different perspective for security. In this section, we will discuss some of t= he ways that security differs in traditional and blockchain environments.
In this section, we're going to talk a bit about how traditional cybersecurity is different than security concerns on the blockchain.
In traditional cybersecurity that we're all used to, w= e're very perimeter-focused meaning that we put trusted data and assets behind a very, very strict perimeter.
We assume that anybody we let inside that perimeter is trusted, either partially or fully, to see that data and access those resources.
And the brunt of our focus goes into making sure that = we keep the right people from getting beyond that perimeter,
that we only let authorized users through, and then we prevent any attackers or strangers from breaching that perimeter and access= ing the data and resources we store behind it.
This is very different from blockchain, which runs on a massively decentralized peer-to-peer global network.
Just by its very definition, you can see that there is= no perimeter on blockchain, and so our security has to come from somewhere els= e.
Our security on blockchain comes from the incredible a= mount of repetition.
The fact that we ask every node to keep the same copy = of the ledger and periodically to reach consensus, majority consensus, on what the proper data in that ledger should be.
This makes the amount of work that an attacker would h= ave to do practically impossible, if they wanted to change, hack, or alter the led= ger.
Another big difference between traditional cybersecuri= ty and security on the blockchain is with conventional applications and convention= al technology.
We either develop all our own code or application para= meters in-house or we rely on a single, third-party trusted provider who creates t= hat line of business system for us.
All the code, generally, comes from one place, and if = we don't write it ourselves, all we have to have is= trust and faith in the third-party organization providing it to us.
In blockchain, things are a little bit different, beca= use oftentimes in blockchain solutions we're writing smart contracts which call code from other smart contracts, which we may or may not write ourselves.= p>
And which may come from a variety of different authors= .
So whereas in the tradition= al cybersecurity space, we really only need to rely on our own due diligence to write secure code or the due diligence of a third-party application provide= r.
In blockchain, we have to expend a lot more time and e= nergy, making sure that the code and the contracts we're calling is safe and secur= e.
In other words, we want to make sure that we're not in= heriting any security vulnerabilities from other smart contracts that have been writ= ten by unknown and potentially untrusted parties.
And the final big difference between conventional cybersecurity and blockchain is that in conventional line of business syste= ms all of our applications either run directly on trusted hardware that we own= as an organization or run on hardware with a high d= egree of trust provided by a third-party such as Microsoft Azure or Amazon Web Services.
In the blockchain world, all of our code runs on untru= sted resources, untrusted hardware that can be owned by anyone, anywhere in the world.
This means that we must ensure that all the trust in a blockchain solution comes from the protocol and the code layer itself, beca= use it's a much more massively distributed network, and we don't have direct control or access into the hardware that supports it.
So, there are a lot of differences between conventional cybersecurity and security in the blockchain space that you're going to wan= t to understand before you deploy your own blockchain solutions.
One of the primary differences between cybersecurity i= n a traditional computing environment and on the blockchain is the environment = itself and what it is and isn't designed to do.
The traditional computing environment is a company net= work fully or, at least mostly, under the control of the company's computer secu= rity staff. While many organizations are making the shift to cloud-based environ= ments, they still have a high degree of control over the security and configuratio= n of their rented systems. Traditional networks are highly centralized, and the focus of cybersecurity on these systems is primarily perimeter-focused. All systems and authorized users on the network are trusted or semi-trusted, so= the focus is on preventing attackers from entering from outside the network.
Blockchain is designed to be a decentralized, distribu= ted system running on untrusted hardware. While security in traditional environments is designed to provide security by putting all data in one pla= ce and building walls around it, security in blockchain is based on ensuring t= hat data is protected from modification by copying data to as many locations as possible to make modification of all copies infeasible. Traditional infrastructure focuses on confidentiality and integrity, while blockchain is designed to provide integrity and availability.
Both traditional computing environments and blockchain=
have
security considerations associated with them. In many cases, the same attac=
k is
possible against both paradigms, but the details of how to implement it var=
y.
Here, we discuss how a few different attacks can be launched against
traditional computing environments and blockchain:
§ Denial-of-service
§ Endpoint security
§ Intentional misuse
§ Code vulnerabilities
§ Data protection.
A denial-of-service (DoS) attack is when an attacker m= akes it impossible for a system to serve its users as designed. This can be accomplished by exploiting a flaw in the system, but, more commonly, is accomplished by performing legitimate actions at a rate higher than the tar= get can handle.
To be effective, denial-of-service attacks typica= lly focus on a systems weakest link or bottleneck. In traditional environments, denial-of-service attacks target a company's web server to prevent customers from accessing the company's services. This can be accomplished by making more connection requests than the server is capable of supporting. In blockchain, a denial-of-service attack involves submitting more transactions to the blockchain than it can handle.
Since many blockchains have fixed-size blocks created = at a fixed rate and are stored in a distributed fashion, they have a maximum capacity that a determined attacker can exceed, rendering the blockchain unusable.
Traditional infrastructure and blockchain environments= also differ with regard to endpoint security. In traditional cyber, endpoints are under the control of the enterprise and have some level of heterogeneity. In blockchain, endpoints are the nodes and may be completely homogeneous.
Heterogeneity can be dangerous because an attacker has= more options for finding a vulnerability to exploit, while homogeneity means tha= t a flaw in one system is a flaw in all of the systems.
Another way that traditional cybersecurity and blockch= ain differ is in the level of trust in the code used in a company's application= s. In traditional cyber, the company writes most of the code, and vulnerabilit= ies can arise only from code that the company controls.
In blockchain, anyone can write a smart contract, and = a flaw in the smart contract or the underlying platform code can have wide-reaching consequences. The only hack to date against the Bitcoin network was enabled= by an integer overflow vulnerability in the Bitcoin protocol.
When exploited, an attacker was able to assign himself= more Bitcoin than was ever intended to be created. If the Bitcoin network didn't break the rules by modifying the historical ledger through a hard fork, Bitcoin would have become worthless. Anyone who wants to use Bitcoin has to accept the risks of hacks like this; they can't modify the code before including it in their application.
Both traditional and blockchain environments are vulne= rable to attacks based on intentional misuse of the system. In traditional cyber, insider attacks or intentional misuse of the system by clients are possible= . In fact, a denial-of-service attack is a specific type of intentional misuse.
In blockchain, systems using Proof of Work incentivize miners to do something a lot, but not too much. The main weakness of Proof = of Work is that a blockchain becomes insecure if more than half of the mining network's processing power is controlled by a single group.
Proof of Work incentivizes miners to control as much processing power as possible to win rewards, but doesn't want them to become too successful.
Finally, traditional infrastructure and blockchain dif= fer in their goals regarding data protection. In traditional cyber, data is siloed, and access is strictly controlled by the owners, placing responsibility for confidentiality, integrity, and availability in their hands.
In blockchain, data is distributed, and the blockchain= is relied upon to provide integrity and availability.
Let's discuss the differences between a public= and a private blockchain:
As the blockchain continues to evolve, the terminology= has become confusing. Both public and private blockchains share many similariti= es:
§&nb= sp; Both are decentralized peer-to-peer networks, each maintaining a shared append-o= nly ledger of digitally-signed transactions.
§&nb= sp; Both maintain transaction replicas in-sync through a protocol referred to as consensus.
§&nb= sp; Both provide certain guarantees on the immutability of the ledger.
More importantly, the main difference between a p= ublic and private blockchain is related to who is allowed to participate in the network, execute the consensus protocol, and maintain the shared ledger.
A public blockchain network is completely open and any= one can join and participate in the network.
A private blockchain network requires an invitation, a= nd must be validated by either the network starter or by a set of rules. Priva= te blockchains are usually set up as permissioned networks, placing restrictions on who is allowed to participate in the network, and o= nly in certain transactions.
Next, let's engage with an interactive lab. In this la= b, we will be examining a blockchain containing 5 blocks, each labeled according = to position. Enjoy!
By the end of this section, you should be able to:
§ Indicate the differences between private and public blockchains.
§ Discuss about the advantages and disadvantages of public and private blockchains.= p>
§ Understand when to use a public vs. a private blockchain.
When we try to understand the main difference between a public and private blockchain, it is important to appreciate that the terminology in the media gets routinely improperly stated.
If you have some time and would like a much deeper div= e into public blockchain vs. private blockchain for the enterprise, there is a gre= at webinar on this topic: "Public Blockchain vs Private Blockchain for the Enterprise".= p>
A public blockchain is really a permissionless= blockchain. Anyone can effectively join the blockchain, meaning that they can read, wri= te, or participate with a public blockchain. Public chains are decentralized, no one entity has control over the network, and they are secure in that the da= ta can't be changed once validated on the blockchain.
A private blockchain is really a permissioned<= /b> blockchain. Permissioned networks place restrictions on who is allowed to participate in the network and in what transactions.
When people get into blockchain, there's a natural discussion about what type of blockchain, because blockchain comes in many different types and flavors.
And normally, we hear about public versus pr= ivate blockchains.
One factor that often gets left out is also the idea o= f an open versus closed blockchain.
And it's important to consider both parameters, so you= know where on a possible solutions quadrant your idea falls.
When we talk about public and private, w= hat we're really talking about is who is able to write data onto = that blockchain or onto that immutable ledger.
The open versus closed brings in to consideration who's able to read that data.
And so, we can talk about solutions which are public a= nd open, public and closed, private and open, private and closed.
When we talk about public blockchains, what most folks= are really talking about is a public open blockchain.
It's a blockchain where anybody can come write data to= the blockchain, anybody else can come read that data.
So, public blockchain platforms like Bitcoin, Ethereum, Litecoin tend to get talked about a lot right now, and these are what we al= so refer to as permissionless blockchain platforms meaning that they really st= rive to, by design, increase and protect the user's anonymity.
And, if we don't know who a user is, if we don't have = a way of identifying individuals, and we don't have any way of creating permissio= n or access rules around that user, and it's what we get, is the system where an= ybody can commit data to that blockchain and anybody can come along and read data= to that blockchain.
There's a perception that public blockchain platforms = like Ethereum can't be used to build permission scenarios or to control access to data.
The truth is they can, they just don't give you the bu= ilt-in tools that a private or permission blockchain platform will.
You can always use these open public platforms to buil= d a permission solution, but just understand that it's upon you, your architect= s, and your developers to create that permissioning model, and that all starts with some kind of identity management system.
When you think of public blockchains, you think about blockchain platforms like Ethereum, understand, by default, by the very nat= ure and design, they're designed to protect anonymity.
And, if we don't know who a user is, then we really ha= ve no way of creating permissions, role-based access and controlling what data th= ey can read or write.
In a lot of situations, this is desirable, this is why= we see cryptocurrencies based on public blockchain platforms, because having t= hat anonymity is important.
And, if a user has a currency, something of value, they should be able to exchange it and spend it, and do what they want with it, = just like anybody else.
We don't want to treat any class of users differently = than any others in those scenarios.
So, that's a public blockchain, and that's a very diff= erent animal from the private permission blockchain.
The benefits of public blockchain are:
§&nb=
sp; Open
Read and Write
Anyone can participate by submitting transactions to the blockchain, su=
ch
as Ethereum or Bitcoin; transactions can be viewed on the blockchain explor=
er.
§&nb=
sp; Ledger
Is Distributed
The database is not centralized like in a client- server approach, and all
nodes in the blockchain participate in the transaction validation.
§&nb=
sp; Immutable
When something is written to the blockchain, it can no=
t
be changed.
§&nb=
sp; Secure
Due to Mining (51% rule)
For example, with Bitcoin, obtaining a majority of network power could
potentially enable massive double spending, and the ability to prevent
transaction confirmations, among other potentially nefarious acts.
So, the counterpart to a public blockchain is naturall= y a private blockchain.
These are platforms like Hyperledger or Hashgraph.
And private blockchains are more specifically known as permissioned blockchains.
When we talk about private blockchain or when you hear= folks talking about private blockchain solutions, they tend to be talking about things on the private and closed end of the spectrum.
We want to control who can write data to this blockcha= in, and we want to control who can read data from this blockchain.
And in order to do that, the first step is ident= ity.
If we don't know who a user is, it becomes difficult, = if not impossible, to define rules about what data they can commit to the ledger a= nd what data they can consume from the ledger.
When we talk about private blockchain, just think abou= t permission blockchain, the blockchain which right from the beginning is an idea of who= you are.
And this is very different from a public platform like Ethereum, in which the platform tries to protect and maximize anonymity.
And we, by design, don't know who a user is, unless we= build in that kind of identity management scheme.
Private blockchains tend to come with identity managem= ent tools or a modular architecture, where you can plug in your own identity management solution.
This can be anything from an Active Directory deployme= nt to an OAuth solution using Google, Facebook, LinkedIn, etc.
Just understand the idea behind the private blockchain= .
All begins with understanding who a user is, because o= nce we understand who a user is, we can determine what role they're in, and we can= use that role to determine what information should they and should they not have access to.
This also changes the incentive for good behavior a li= ttle bit in a public blockchain, because we don't know who a user is.
We rely on economics and game theory incentives to ens= ure that everybody in the system behaves honestly and according to the rules.= p>
We set up situations through group consensus, which we discuss in other sections in this course, through which honest participants= are economically rewarded, where dishonest ones only incur work or cost, with no possibility of ever recouping that cost.
In a private permission blockchain, we rely on the fac= t that we know who a user is.
In a corporate scenario, blockchain for the business, = blockchain for supply value chains, because we know who an individual is, what organization they're associated with and what their role is, we also assume that they're going to behave fairly aboveboard, because if not, we know exa= ctly who's misbehaving and they know that they're gonna suffer the consequences for that.
Public and private blockchains, two very, very differe= nt offerings.
A lot of people make the impression, get the impressio= n that they compete with one another, when really they = don't.
They just serve to provide different types of solution= s and enable different kinds of products and offerings to be built on top of them= .
Lets discuss what private blockchains are and wh= y they are utilized by enterprises:
§ Private blockchains are also referred to as permissioned or enterprise blockchains. Enterprises need to ensure some level of security, privacy, compliance, performance, and many of the properties that a private blockchain can provi= de.
§ Can be open sourced, consortium, or privately developed. There are many options= for a private blockchain, and the most common ones are R3 Corda, Hyperledger, a= nd Quorum.
§ Transactions are processed by select nodes in the blockchain. From a performance perspective, this is where having only a few nodes process transactions vs. 14,000 nodes in Ethereums case can really create a performance gain around latency and transaction speed.
§ Transactions are not publicly viewable (transparent) in the blockchain, and only select nodes can access the ledger.
§ Locally distributed, examples include: R3 Corda can transact between nodes, and the rest of the blockchain does not participate.
The benefits of private blockchain are:
§ Enterprise
Permissioned
The enterprise controls the resources and access to the blockchain, hence
private and/or permissioned.
§ Faster
Transactions
When you distribute the nodes locally, but also have much less nodes to
participate in the ledger, the performance is faster.
§ Better
Scalability
Being able to add nodes and services on demand can provide a great
advantage to the enterprise.
§ Compliance
Support
As an enterprise, you likely would have compliance requirements to adhe=
re
to, and having control of your infrastructure would enable this requirement
more seamlessly.
§ Consensus
More Efficient (less nodes)
Enterprise or private blockchains have less nodes and usually have a
different consensus algorithm, such as BFT vs. POW.
So now that we've talked about public and private blockchains, what those terms mean, and again, you can think of that as permission versus permissionless blockchains, we can talk about some of the differences and what each different type of platform aims to provide.
So, public blockchains are really good for scenarios w= here protecting the anonymity of users is important or adds value to the solutio= n, and they're really great platforms for solutions where all users should be trea= ted equally.
And we can see this, because most public blockchains r= ight now are used to support cryptocurrencies, and this is a real great use case= .
With a cryptocurrency like Bitcoin, Litecoin, Ethereum, etc., we don't want to have any permissioning= or role-based access.
Anybody should be able to own some Bitcoin.
Anybody should be able to trade it with anybody else, = and it's not necessarily important that we know who the participants in any transaction are.
And so that leads to an open permissionless model with= full transparency.
This is very different in the corporate world, where w= e see private blockchains being adopted at scale, because the concerns are the opposite.
In a corporate scenario, in a business scenario, anony= mity is a bad thing.
I want to know exactly who all the participants are, a= nd I need to know who they are, because I don't want full transparency.
I don't want to share all my business data with all the participants in my business network or the general public at large.
I want to control who sees what type of information un= der what circumstances, and I also want to control who is able to contribute th= at information onto the blockchain.
I might use a private blockchain solution to manage supplier-vendor relationships, where only myself and my suppliers can see t= he price that I'm paying for a certain item.
Only a particular supplier gets to see the details of = the contract that I have with them, and not the details of a contract I have wi= th any other suppliers.
And I may wish to share some of this high-level macro = data with consumers, so that they can see the origins of the products they're buying, but of course I'd want to hide the financials behind all that.
When we look at how these two solution types differ, w= e see the public blockchains tend to focus more on B2C or business to consumer sc= enarios, whereas private blockchain offerings like Hashgraph, Hyperledger, really lend themselves well to B2B scenarios, supply chain, va= lue chain relationships or creating any kind of shared infrastructure between enterprises.
So, just understand that, well, there's a big misconce= ption that these are competing offerings.
They're really not and many real-world use cases use components of both.
It's important to understand the difference between th= em and it really all starts with identity management.
When you're thinking in your head about public versus private blockchain understand that it all begins with identity management, = and in a private blockchain I know who all the participants are right from the beginning.
In the public blockchain, again, I don't know who those participants are, and that's not to say that I can't build a permission solution on a public platform, but myself, my architects, and my developers= are going to have to develop the logic and the mechanisms behind identity management.
So that's public and private blockchain. Two very, very different animals.
They serve vastly different purposes and as you start = to dig into a lot of real-world use cases, what you're going to find is many use c= ases make use of both types of blockchain integrated seamlessly.
When it comes to deci= sion making around what blockchain model to use, it's important to understand the considerations:
By the end of this section, you should be able to:
§ Discuss about the actors in a blockchain.
§ Review the history of the blockchain.
§ Analyze the flow of a transaction in blockchain.
Blockchain architect designs and builds blockchain net= work:
§&nb= sp; Optionally, traditional databases are set up to store data off-chain.
§&nb= sp; Optionally, external processors are set up to allow blockchain to offload computation if necessary.
§&nb= sp; Optionally, peer relationships are set up with external systems via system integration.=
In this section, we'll discuss the blockchain transact= ion flow.
Regardless of the blockchain technology, the flow of d= ata through a blockchain will remain relatively the same, at least at a high le= vel.
It will all start with a blockchain user performing an operation that should be stored on the chain.
The operation will trigger a smart contract, or it will trigger chaincode.
In either case, the code will be executed on the actual blockchain itself.
The output of this code will result in a transaction, = and that transaction is what we intend to be stored on the blockchain.
Next, the blockchain operators using protocols that wi= ll be specific to the specific blockchain that's running on will spread that transaction throughout the blockchain network.
The block creators will collect all of the transaction= s and it will create a new block.
In most blockchains, this is the job of the miner and = is the output of the mining process.
The block operators will spread the block through the = peer network to update the ledger copies once consensus has been achieved.
And this results in the block operators again executin= g code included in transactions within the block to update their own copy of the internal state of the blockchain.
The users will be notified of an event from a blockcha= in creation via an event.
Once a blockchain sol= ution is completely set up, end users can interact with its smart contracts to take advantage of its available functionality.
To begin, a blockchai= n user performs an operation that should be stored on the blockchain. This can be accomplished by interacting with software that interfaces with a smart cont= ract on the blockchain.
Once the smart contra=
ct is
triggered, the relevant code is encapsulated in a transaction, which spread=
s to
all blockchain operators through peer-to-peer transactions on their network=
.
Through the blockchai= ns consensus mechanism, one of the blockchain operators is selected to be the creator of the next block on the blockchain. This operator collects all of = the transactions created since the previous block into a new block, and finaliz= es the new block.
This block is spread throughout the peer network through the same peer-to-peer communications as transactions.
When block operators&= nbsp;receive a copy of the new block, they add it to their copy of the distributed ledger = and execute the smart contract code included in each transaction in the block. = This guarantees that all members of the peer network agree on the current state = of the blockchains distributed computer.
The users wallet mon=
itors
for the creation of new blocks that include transactions associated with the
user. When a block containing the completed code from the users operation =
is
received, an event is created to notify the user that the operation is
complete.
By the end of this section, you should be able to:
§ Explain what consensus is and why consensus is needed in a blockchain.
§ Explore different methods of achieving consensus (Proof of Work, Proof of Stake, et= c.).
§ Discuss the advantages and disadvantages of each method.
§ Discuss consensus incentives.
§ Analyze what consensus achieves and how.
The blockchain is a distributed and decentralized syst= em, which means that it needs to have a way of tracking the official current st= ate of the system. Since the blockchain can include financial transactions and business agreements, it is important that all parties involved are in sync = regarding the terms of the agreement.
In this section, we will discuss the details of how a blockchain network comes to agreement on the contents of the blockchain.
So, one of the most important components to blockchain= is this idea of group consensus.
As we talked about in an earlier module, blockchain is inherently a very inefficient system.
We're asking multiple nodes, sometimes tens of thousan= ds of computer nodes, to all repeat the same work: they're all keeping a copy of = the same data.
And the reason we agree to this tremendous inefficienc= y is because if we can get all or most of those nodes to agree on what the truth= is.
We can have a lot of trust that that's actually the tr= uth, that that record hasn't been tampered or altered or changed in any way.
So, consensus is one of the underpinnings of blockchai= n.
There are several different methods we use right now t= o have all these nodes reach consensus.
Essentially, when we talk about consensus, you can thi= nk of every block in a blockchain as being like a sheet of paper.
It's got a fixed amount of space. We write a transacti= on on every line, and when that sheet of paper is full, it's important that we al= l, as a group, come together and compare our different sheets and select the s= heet or the version of paper that the majority agree with.
And so, there are several different methods that we us= e to come to consensus on a block.
The oldest and most widespread method is what's called= Proof of Work.
And you'll see in another module, we actually dive into Proof of Work hands-on, and show you live what Proof of Work looks like and= how it actually works.
Proof of Work has served us well for the past nine, al= most ten years, got its start in Bitcoin, and it's used in every major public and most private blockchain offerings.
But we're also starting to see some of the limitations= of Proof of Work.
One of the big limitations behind Proof of Work right = now is how big and how fast it can scale.
Currently on Proof of Work blockchains, we're able to process somewhere between 50 and 20 transactions worldwide per second, which may sound like a lot until you realize that modern payment processing netwo= rks like Visa can scale up to over 70,000 transactions a second.
So, in order to compete with conventional technology, blockchain really needs to add a few more orders of magnitude to that transaction rate.
There are many proposed alternative consensus methods = for how we might be able to reach that kind of scale.
There are things in production right now like Tangle w= hich use a blockless solution, and they're also new = and emerging consensus methods like Proof of Stake, or Proof of Activity that w= e're currently examining to take the work out of Proof of Work.
We also have another module in this course where we ta= lk about Proof of Stake, and then another one where we compare Proof of Work versus Proof of Stake.
So, if you're curious about any of the details of how = these consensus mechanisms are actually implemented, be sure to check out those modules.
But the takeaway point to understand is that, it's this consensus, it is this idea of asking all of these nodes, potentially tens of thousands of nodes to all repeat the same work and then periodically come together and agree on whatever the majority select the right version of the truth to be.
That gives blockchain that high level of trust and that makes it such a secure record store.
The blockchain is des= igned to be a shared, synchronized historical ledger, meaning that there needs to be= a final decision at some point on what should and shouldnt be included in the official record. Since blockchain is decentralized, there is no "higher authority" that can rubber-stamp and finalize the contents of a blockc= hain block.
The method that Satos= hi Nakamoto, the creator of blockchain, invented to achieve consensus is based= on scarcity. In one way or another, blockchain consensus algorithms boil down = to some kind of vote where the number of votes that a user has is tied to the amount of a limited resource that is under the users control. Based on the economic Laws of Supply and Demand, collecting enough of an asset to have a controlling share will drive up the price of the asset enough to make achie= ving that level of control unfeasibly expensive.
Satoshi Nakamoto inve= nted a consensus algorithm called Proof of Work for the use of Bitcoin. Since then, several other consensus algorithms have been invented to fit different use cases. T= hese include Proof of Stake, Delegated Proof of Stake, Practical Byzantine Fault Tolerance, and Directed Acyclic Graphs. The most commonly used consensus algorithms are Proof of Work and Proof of Stake.
In Proof of Work, users in the blockchain network = ;who want to create the next block (and win the associated reward) are called miners. To win the right to mine a block, miners race to find an acceptable solution to a hard cryptographic problem. As we discussed previously, ha= rd mathematical problems can only be solved by random guessing. When a miner f= inds an acceptable solution, they create a block and broadcast it to the network, finalizing that block.
Proof of Work exploits the scarcity of computational resources by choosing a problem that can only be solved by guessing. There = is no limit on the number of guesses that a miner can make at once. Proof of W= ork, therefore, incentivizes miners to run as many mining machines as possible to maximize the probability that they are the first to find a solution to the problem. Since mining computers take money to purchase and money to run, the amount of control that a user can exert over the blockchain is limited by t= he amount of money they have available to invest in mining equipment.
The security of the P= roof of Work consensus is based on the assumption that no one controls more th= an half of the computational resources of a blockchains mining network. If th= is was the case, the miner has a high probability of finding an acceptable solution to the mining puzzle before anyone else for every block in the blockchain. This gives the miner complete control of the blockchain and bre= aks the decentralization of blockchain.
Users in a Proof of Stake blockchain can "stake&q= uot; or promise not to use the tokens they own. This gives them the opportunity = to be selected as the next user to create or "forge" a new block and earn the reward. A block forger is pseudo-randomly selected from all of the users who have staked some of their assets, and the selection process = is biased based on the size of the stake.
For example, imagine that a wheel is divided into sect= ions where the size of a section is proportional to the size of a users stake. = The next block creator would be chosen by spinning the wheel and seeing whose section comes out on top. In Proof of Stake, each user has a copy of the wh= eel and they are all synchronized so that each person can independently determi= ne the selection and get the same result. This is why Proof of Stake uses a pseudo-random instead of a random selection process.
In Proof of Stake, an attacker needs to control enough of the staked currency to guarantee they w= ill be selected to create every block. Since cryptocurrency is a limited asset, buying up enough of it to do this is expensive, making attacks on Proof of Stake systems economically infeasible.
Ethereum currently uses Proof of Work for consensus. And Casper is the planned migration of Ethereum from Proof of Wo= rk to Proof of Stake.
Of the three blockchains studied, Ethereum is the only= one that uses a standardized consensus mechanism. Ethereum was designed from the beginning to use Proof of Work for consensus, until a forced hard fork to t= he Proof of Stake implementation (codenamed Casper). This forced hard fork is baked into the Ethereum protocol and will be accomplished by slowly increas= ing the difficulty of the Proof of Work problem until the time taken to solve it increases to the point where Proof of Work becomes unusable. Proof of Stake does not require the same energy consumption as Proof of Work and is a more sustainable and scalable consensus mechanism.
Hyperledger Fabric breaks out consensus in= to components, allowing users to pick a consensus algorithm for their particul= ar use.
Hyperledger Fabric deliberately avoided hard-coding a consensus mechanism into the protocol by defining an = orderer component that performs all of the consensus-related operations. This allo= ws users of Hyperledger Fabric to select a consensus algorithm that fits their= use case without being forced to make large-scale code edits.
Each Corda network has a notary servi= ce made up of independent parties that approve blocks using any applicable consensus algorithms.
Corda does not follow the standard blockchain model of transactions being bundled into blocks and then being finalized by the netw= ork as a whole. Instead, a Corda network contains one or more notaries consisti= ng of several independent parties.= Transactions in Corda are finalized by a notary with a multiparty digital signature usin= g an algorithm like Raft.
Blockchain is a distr= ibuted, decentralized system that maintains a shared state. While consensus algorit= hms are designed to make it possible for the network to agree on the state, the= re is the possibility that agreement does not occur. Fault tolerance is an important aspect of blockchain technology.
One of the things we've talked about extensively in th= is series is how inefficient and redundant blockchain is and that is by design= .
That's what gives us immutability.
And another thing it gives us is an extreme level of f= ault tolerance.
At its heart, blockchain runs on a peer-to-peer network architecture in which every node is considered equal to every other node.= p>
And unlike traditional client-server models, every nod= e acts as both a client and a server.
And so, we continue this redundancy down at the network level, where we're asking all these nodes to perform the same work as all t= hese other nodes.
Like any peer-to-peer system, we have an extremely high degree of fault tolerance.
In fact, if we have two or more nodes online in a bloc= kchain system, we still have a working blockchain.
And when you think about that amazing fact given the s= cale of major public blockchains, you can see the inbuilt fault tolerance.
Let's look at Bitcoin for an example.
That's a blockchain that consists of over 30 thousand = nodes coming to consensus on every block.
As long as we have two or more of those nodes online a= nd able to communicate, we still have a working solution.
That gives us a tremendous margin for error, for nodes coming and going offline, for network transport issues, and it makes blockc= hain really, really a great platform to use in environments with less than ideal networks and power infrastructure, because we can have nodes come offline, = go back online and when a node comes online after being offline for a while, a= ll it has to do is sync up, and get all the data that it missed while it's been offline from all of its peers, and then it's right back online participating like all the rest.
This is very different from the centralized systems th= at blockchain aims to replace.
In a traditional client-server model, if that server is offline, those clients have no way of getting the data that they requested = or performing the operations they'd like to perform.
This is not the case in blockchain.
And if we look back historically at other peer-to-peer solutions, solutions like Bittorrent or Napster, we've seen the tremendous difficulty that authorities have had taking some = of these networks offline.
That is due to the fault tolerance you get from a peer-to-peer architecture.
In fact, we saw this recently during the Arab Spring, = when the Egyptian government decided one night to shut down Internet access for = the entire country.
Well, within 24 hours Egypt was back online and connec= ted to the Internet through a network-sharing mechanism known as mesh networking, = which at its heart is just a peer-to-peer method for sharing Internet connectivit= y.
So, we know that peer-to-peer has a long history of providing extremely high fault tolerance and reliability, and that's why we= 've chosen to build a platform like blockchain on top of it.
So, if you're looking for a solution platform that off= ers you that kind of incredible fault tolerance, if you're looking to deploy a solution into areas with less than ideal infrastructure or under conditions where nodes may come online and go offli= ne frequently, then blockchain may be a really good platform to look at.
§&nb= sp; Several generals needing to agree on a coordinated plan of attack.
§&nb= sp; One or more generals may be traitors.
§&nb= sp; All generals will abide by the majority decision, but may try to influence it.<= /p>
§&nb= sp; All nodes are untrusted.
§&nb= sp; Nodes must come to a consensus on the official state of the blockchain.
The Byzantine Generals' Problem is a scenario designed= to demonstrate the difficulty of multiple parties coming to an agreement when communication can only be accomplished on a one-to-one basis and is untrust= ed. In the story, several Byzantine Generals are besieging a city with their separate armies. If they all attack together or all retreat together, they = will be ok, but if some attack while others retreat, they will be destroyed.
The generals can only communicate by messengers, who c= ould be intercepted and forced to carry fake messages, and one or more generals = may be a traitor. The goal is to find a way to achieve a consensus on strategy despite the possibility of traitors and false messages. Presumably, all generals will abide by what they believe is the majority consensus. The Byzantine Generals' Problem is solvable as long as two-thirds of the genera= ls are honest.
Blockchain is designed to be Byzantine Fault Tolerant, meaning that the network will come to a consensus on the official state of = the blockchain, despite the fact that some members may misbehave. The solution = to the Byzantine Generals' Problem is inefficient, so the blockchain needs some way of being confident of consensus without going through a full solution.<= /p>
So, we've talked a lot in this course about Proof of W= ork versus Proof of Stake.
Proof of Work is the oldest and the original consensus protocol. It's coming up on its tenth anniversary; first one into production with Bitcoin back in 2009.
And as a consensus protocol, it served us very, very w= ell.
There have been a number of hacks and exploits that ha= ve been committed against various smart contracts and solutions written on top= of the blockchain.
But for almost a 10-year history with over half a trillion dollar market cap, no one's been able to successfully exploit Proof of Work itself, which really shows the security = and the reliability of the protocol.
However, there are some shortcomings and criticisms to= Proof of Work that are now leading us to look at alternative consensus mechanisms, like Proof of Stake.
One of those is our transaction processing capability.=
On a good day, Proof of Work is capable of processing anywhere between 10 and 20 transactions per second worldwide.
This may sound like a lot, but it still leaves us a wi= de gap to conventional processing powers, that something like Visa's payment processing network which can scale up to over 70,000 transactions per secon= d.
So, in order for blockchain to continue to be a succes= sful solutions platform, we know that we're going to need to find other consensus mechanisms, which allow us to scale up that transaction processing speed in= to a range where we start to compete with conventional technology.
There are also some other criticisms behind Proof of W= ork that are leading us to alternative methods, like Proof of Stake.
One of those is the idea of centralization.
As you know from this course, one of the key tenants of blockchain is the idea of decentralization, that no one central authority, intermediary or participant, should ever have too much power or control in a blockchain network.
What we're seeing right now with Proof of Work is an a= rm's race, where folks are competing with very various specialized pieces of equipment, specialized hardware, specialized mining rigs, in order to mine = most efficiently.
And this can be done most efficiently in large data ce= nters where electricity is cheap.
Right now, almost 80% of the processing power behind t= he Bitcoin network resides in six major data centers in mainland China.
A lot of advocates and blockchain purists think that t= his is far too much centralization in one geopolitical region of the world.
One way we aim to change that is through Proof of Stak= e, where we remove the work component of group consensus and we replace it with a ve= ry specialized form of gambling or wagering.
The idea of being that if we no longer require special= ized hardware in order to come to consensus, we can allow anybody with any kind = of device to participate in consensus.
That may be you, at home wi= th an old laptop, or a friend with a smartphone, or a tablet, or an iPad, that si= ts on your nightstand most days and doesn't get used.
This allows for a much wider and more decentralized ra= nge of devices and potentially a much larger network size to participate in consen= sus.
Speed and the idea of decentralization are big drivers behind the move to Proof of Stake.
And we're going see how well that works out.
We'll see Proof of Stake finally go live in Ethereum l= ater this year (2018), certainly with more blockchains to follow if it becomes a successful consensus mechanism.
So, when you hear the debate these days about Proof of= Work versus Proof of Stake, and you're trying to understand what do they mean and why are we looking at transitioning from one to the other, understand that we're just trying to overcome some of those big limitations behind Proof of Work, the consensus mechanism that has served us so well to date.
We're trying to find consensus mechanisms that most importantly allow us to scale up, to get our transaction processing power on par with conventional technology, and we're also trying to remove some of t= he centralized aspects that we've seen form around Proof of Work.
We talk about Proof of Work and Proof of Stake in much greater depth in other modules in this course.
So, if you're curious about the difference between the= m, how they work and what the actual implementation differences are, be sure to ch= eck out those other modules.
|
P=
roof of
Work |
P=
roof of
Stake |
|
Distributed consensus among untrusted and identifiab= le nodes |
Distributed conse=
nsus
among untrusted and identifiable nodes |
|
Incentives are re=
worded
within the system for work done outside of the system |
Incentives are rewarded within the system for e= scrow inside the system |
|
Relatively high cost of entry, but high returns |
Low cost of entry, but low returns |
|
Empirically proven |
Experimental |
Proof of Work provides a game-theoretical distributed consensus algorithm:
§ Proof of Work incentivizes mining nodes on the network to reach for the thermodyn= amic limit of computational cycles. This incentivizes decentralization because h= eat from mining nodes dissipates better in two separate places rather than one centralized location. Note, this decentralization is solely physical and a network distribution.
§ Proof of Work has empirically proven that game-theory can be weaved into a protoc= ol because it successfully applies incentives at every possible action within = the network.
§ Proof of Work only works because it is optimization-free and approximation-free.<= /p>
2.&n= bsp; Approximation-free means there is no possible way to almost have a block. The process is binary; there are blocks and not blocks.
Proof of Stake provides an experimental in= ternally game-theoretical consensus algorithm:
§ It relies on nodes already having cryptocurrency to stake. It rewards nodes wi= th the most money staked, and not the most computational power.
§ It requires that each validating node be identifiable. This is because the sta= ked coins must be held accountable for any malicious acts. Proof of Work does n= ot require identification.
§ In Proof of Stake, you are competing with a much larger group of nodes. There = is no transactional friction involved in staking coins, unlike in Proof of Wor= k, which requires buying mining hardware, hooking up internet, providing cooli= ng systems, etc.
By the end of this section, you should be able to:
§&nb= sp; Explain what governance is.
§&nb= sp; Discuss the different types of governance and what types of governance are used in = the blockchain.
All organizations and software development projects ne= ed a way to finalize each decision along the roadmap. Most organizations are centralized and have a set leadership team. Several strategies for governing the decentralized blockchain have been developed.
Effective blockchain governance includes:
§&nb= sp; Incentives
§&nb= sp; Methods of coordination.
Before getting into the details of how governance work= s on the blockchain, its important to have a clear definition of what blockchain governance is. Every blockchain is an evolving system that needs to change = to meet the needs of its users. If a blockchain isnt relevant and useful, the= n it wont survive.
To evolve, the blockchain needs to make changes and ne= eds a way to make final decisions on what these changes should be. Most organizat= ions have a leadership team or a CEO who is the final authority for their organization. However, blockchain is designed to be decentralized, and not = be under the control of any person or group. This means that blockchain needs another way to make decisions regarding the blockchains roadmap.
For blockchain governance to be effective, it needs to include both incentives and methods for members to coordinate. Without incentives, members wont participate in governance and the blockchain will become less aligned with user needs over time. Without a method for members= to coordinate, it will be impossible for a blockchain network to come to an agreement on future changes.
Several different blockchain governance strategies hav= e been proposed and implemented for different blockchains. Here, we will review so= me blockchain governance strategies sorted from the fewest to the most members directly involved in the decision:
§&nb= sp; "Benevolent Dictator for Life"
§&nb= sp; Core Development Team
§&nb= sp; Open Governance
§&nb= sp; On-Chain Governance.
The original creator or lead developer of a cryptocurr= ency has the final say on all decisions.
The sim= plest blockchain governance strategy is nicknamed "Benevolent Dictator for Life". In this strategy, the creator of the blockchain= is the final authority on all decisions regarding the blockchain. A good examp= le of this type of leadership is Facebook, where Mark Zuckerberg has the final= say on the future roadmap of the Facebook platform.
A team of the most active developers decides what func= tionality should or shouldnt be included.
The next step up places con= trol of the blockchain roadmap in the hands of a Core Development Team. This is a strategy commonly used in open source programming projects, where users are able to offer or request features, but developers have the final say on what is or is not included in the official release.
The team making governance decisions for the blockchai= n is chosen by the users of the blockchain.
Some blockchains use the Open Governance&n= bsp;method of handling governance of the blockchain. In this system, the team that mak= es the final technical decisions for a system is selected by the systems users.
The rules for how the blockchain operates are stored on-chain in smart contracts with built-in capability and procedures for modifications.
A blockchain-specific governance strategy is O= n-Chain Governance. In this form of blockchain governance, the rules describing= how the blockchain should operate are stored on the blockchain itself. These regulations typically are implemented as smart contracts on the blockchain = with built-in methods for users to modify the rules based upon their needs and t= he needs of the blockchain.
Who Really Governs the Blockchain?
Blockchain governance comes down to the users.
Major changes to a blockchain require a hard fork. A h= ard fork is a change to the blockchain protocol that makes it incompatible with= old clients.
§&nb= sp; For a hard fork to be successful, users need to agree to follow it.
§&nb= sp; Users can refuse to follow a hard fork, creating a divergent blockchain. The DAO = Hard Fork on Ethereum created Ethereum Classic.
Despite the official story of who governs the blockcha= in, in the end, the users are the ones who really make the final decisions of what will or will not be included in the blockchain. With the huge number of potential options, users can abandon a blockchain that makes changes that t= hey disagree with.
Any major change to a blockchain requires a "hard fork". All this means is that the blockchain protocol has changes that= are not backward compatible, so blockchain clients that do not make the switch = will not be able to operate on the main blockchain. For a hard fork to be succes= sful, users of the blockchain need to make the decision to update their clients to incorporate the new changes.
If not, all users decide to make the switch after a ha= rd fork, a divergent blockchain can be created. Since the blockchain is a distributed network, the decision to implement a hard fork doesnt cause the old version of the blockchain to become non-functional. Users who choose no= t to follow the fork can decide to maintain the old blockchain, fragmenting the blockchain network.
One famous example of this type of fragmentation is th= e DAO hack on the Ethereum network. The DAO was an Ethereum smart contract that completed a record-breaking crowdfunding campaign on the Ethereum network, = with all of this value stored within the DAO smart contract. A flaw in the smart contracts code allowed an attacker to create another version of the smart contract under their control and siphon off a portion of the DAO contracts funds, worth roughly 72 million dollars at the time. After much debate, the Ethereum network decided to implement a hard fork that allowed investors of= the DAO to reclaim their stolen Ether.
This was a very contentious decision because the histo= rical ledger in the blockchain is supposed to be immutable and all transactions a= re final. Smart contracts are supposed to be their own final authority, so any action that could be performed with a smart contract, including exploiting a programming flaw to drain value from it, is considered fair game. The Ether= eum networks decision to reverse the DAO hack went against the principles of blockchains immutability and the supposed self-regulation of smart contrac= ts.
Some of the Ethereum network refused to follow the DAO= hard fork, resulting in a divergent blockchain where the DAO hack was successful. This created the Ethereum Classic cryptocurrency, which shares the same his= tory as Ethereum up to the DAO hack, but is completely independent after that po= int. Despite the "official" decision to reverse the DAO hack, users ma= de the final call of whether or not they would abide by that decision.
Weve been discussing=
the
decisions made regarding the Ethereum blockchain, but havent discussed who
made those decisions yet. Ethereum uses the Benevolent Dictator for Life =
mode
of blockchain governance. While user input and input from the development t=
eam
is welcome for Ethereum, Vitalik Buterin
is the final authority on decisions regarding the Ethereum roadmap.
Hyperledger frameworks, on the other hand, use an Open Governance model to make technical decisions regarding the Hyperledger environment. The Hyperledger Technical Steering Committee (TSC) is the final authority for technical decisions in Hyperledger.
Each year, the Hyperledger Technical Steering Committe= e is selected from the Hyperledger environments active contributors and maintainers.
Contributors and maintainers can submit themselves as potential candidates for the eleven slots, and the slots are filled based on voting by the same group of contributors and maintainers. This model is designed to allow those with an active role in the Hyperledger development community to have a say in how that community is governed.
Corda also uses an Op=
en
Governance model to make technical decisions regarding the future of the
blockchain. The Corda Network Governing Body will be selected to represent =
the
interests of all users in the Corda network.
By the end of this section, you should be able to:
§ Understand why anonymity is required in public blockchains.
§ Discuss how private/public key cryptography provides anonymity.
In this section, we're going to discuss identity on the blockchain.
Let's start by understanding why we even need to have = an identity on the blockchain.
Centralized systems can be coerced by other forms of authority to shut down their network.
Let's take Napster for example.
Napster had a decentralized network architecture, but = they maintained the centralized authority.
Therefore, the central authority could be attacked and= , by taking out the central authority, could effectively control Napster.
This is because Napster relied on that mix of centrali= zed control over a decentralized network.
This impacted identity because you need an identity to control.
Torrents on the other hand, they do not operate in the= same fashion.
Torrents provide a decentralized network with decentra= lized authority.
This allows the nodes to manage identity differently.<= /p>
It's also the reason why torrents are still being used today, in spite of the entertainment industry's best efforts to stop it.
Torrents remove the central authority.
So, this begs the question "Why didn't point-to-p= oint networks like torrents attain the same level of acclaim as blockchain?"= ;
Because there's no guarantee that the nodes would do t= he right thing.
Nobody could guarantee that the nodes would cooperate = with each other.
This leads to an extremely important question.
How do you incentivize the nodes on the network to fol= low the rules?
In a torrent system, anyone can download and share a f= ile, but there's not a real incentive to be a good actor on the network.
What happens when people do something dishonorable on a torrent for instance, and stop seeding the files that ate up bandwidth or occupied space on their computers?
Instead of music going to the network or other files, = what if it were money going through a point-to-point network, through a bank network, let's say?
Your transactions would never be processed reliably.= p>
You couldn't trust that the processing was not messed = up, either deliberately or accidentally.
Further, because of anonymity and the way that identity works in the blockchain, you wouldn't have a way to punish or reward the actors.
Blockchain solved this problem.
It perfectly incentivized how to create a decentralized self-contained network using crypto economics.
This differed from earlier point-to-point networks bec= ause it offered economic incentives to the nodes that followed the rules.
Nodes are given money for following the rules.
This money is in the form of cryptocurrency.
The nodes were punished for tampering with the system = or with past transactions, or submitting a bad transaction.
This is why all public blockchains can operate without= an authority.
It is also the reason why cryptocurrency is mandatory = for a public blockchain, and not needed for a private blockchain.
Because you need a way to incentivize the actors on the network.
Consider how these rewards and these punishments work = and how a system without a central authority can determine what is valid and wh= at is invalid.
On the blockchain, identity is important.
You have to be able to prove that your assets actually belong to you.
Different blockchains they use different systems for tracking identity and identity information,
but most are based on the principles of public key cryptography.
Before we get into the details of how identity works o= n the blockchain, we need to discuss the basics of public key cryptography.
The security of a public key cryptography it's based on let's call them hard math problems.
So, by that, I mean a hard math problem is one where i= t's easy for someone to calculate it, but it's hard for someone to reverse that calculation.
Take multiplication, for example.
All things considered, multiplication is easy.
If you have a little bit of time, something to write w= ith, you can pretty much multiply any two numbers and get the right answer.
A computer can do can do that even more quickly.
Factoring on the other hand, it's hard.
The best way to factor a large number is to try every possible factor until you find the right one.
Well, this approach works well if the number to be fac= tored is small.
It quickly becomes virtually impossible with a suffici= ently large factor.
Some public key cryptography algorithms are designed s= o that breaking the algorithm requires factoring very large, usually prime numbers= .
Another hard math problem used in public key cryptogra= phy is based on exponents and logarithms.
Exponents are easy, since it's essentially multiplicat= ion, and logarithms are hard, since you're essentially factoring.
Most public key algorithms that use exponents use a ty= pe called modular exponents.
All this means is that when they're done calculating t= he exponent, they divide the result by a publicly-known value called the modul= us, and they keep only the remainder.
RSA is a commonly known public key cryptography algori= thm.
It's based on exponents and logarithms.
RSA uses the power law of exponents.
What this means is that, if you take a number, you rai= se that number to a power, and then raise the result to another power,
that you'll get the same result as if you simply multi= ply the two exponents together and then raise the base to the result.
An RSA user chooses two exponents so that any number r= aised to the product of the two exponents in a given modulus produces the original number.
One of these is called the public key and that public = key is distributed freely, while the other is the private key, which is intended t= o be kept secret.
If someone wants to send a private message to the user= , they convert it to an integer using a publicly-known method.
They raise it to the power of the user's public expone= nt and they send the result to the user.
The user raises the received value to their private ex= ponent producing the original message.
RSA is secure because an attacker must be able to calc= ulate a logarithm to determine the secret message.
Since this takes guessing every possible value until t= he correct one is found,
RSA is designed to make the number of potential values= so large that finding the right one is pretty close to impossible.
Another public key algorithm uses different math behin= d the scenes, but the basics are effectively the same.
A user creates a public key and the private key that c= an be used together for either encryption or signing, which we'll talk about late= r.
The algorithms are designed so that an authorized user= only has to do the, quote, "easy calculations", while an attacker has = to perform the hard calculations, and the algorithm is designed to make attack= ing so that the hard algorithms are close to impossible.
Public key cryptography is how identity is handled on = the blockchain.
A user's address on the blockchain it's their public k= ey.
This has several useful properties.
Users do not need to reveal their identity on the blockchain, but they can positively identify themselves, since determining their private keys requires solving a quote, "hard problem".
Anyone can send a user an encrypted message, since the= y have easy access to their public key.
Users can verify the validity of their transactions us= ing digital signatures.
You can think of a digital signature as the opposite o= f an encrypted message.
In RSA, anyone can send an encrypted message to a user= by converting it to a number, raising it to their public exponent, and sending= the result to them.
The user's public and private keys are designed so tha= t the users can retrieve the original message by raising the received message to their private exponent.
RSA digital signatures involve the opposite process.= p>
A user writes a message and raises a condensed form of= the message to the power of their private exponent to create a signature, then = they publish that signature.
Their public key and their message are both published together.
Anyone can verify the signature using a simple three-s= tep process, condense the attached message using the same method as the message writer, the message originator, raising that attached signature to the user= 's public key, then verifying that the results of the previous two steps are i= dentical.
Digital signatures work for the same reason that encry= ption works in RSA.
An attacker needs to know the user's private key to pe= rform either operation, and the algorithm is designed to make that process diffic= ult or very close to impossible.
This means that identity on the blockchain boils down = to the possession of a user's private key.
So, it is absolutely important that that private key b= e kept safe.
In Ethereum, a user's identity is managed using a publ= ic key or address, and the user can use the corresponding private key to sign transactions and read encrypted messages that are sent to them.
In Hyperledger (Fabric) and Corda, identity is encoded= in x.509 certificates, which include the user's public key.
In Corda, specifically, certificates can either be pub= lic, which means that they are published to the blockchain, or confidential, mea= ning that they are only shared with the parties that the owner performs transact= ions with.
Identity in the blockchain is based on public key cryptography. A persons address on the blockchain is their public key.
Transactions on the blockchain include their public ke= y and are digitally signed with the senders private key:
§ A digital signature verifies that someone in possession of the private key authorized the transaction.
§ Digital signatures can be easily verified using the corresponding public key, which= is included in the transaction.
o
A users identity is an address based on their public key.
o
Identity is managed by X.509 certificates.
o
Identity is managed by X.509 certificates:
1.&n= bsp; Public: Certificates published on blockchain=
2.&n= bsp; Confidential: Certificates only shared with parties involved in transaction.
In this section, we'll discuss anonymity on the blockc= hain.
Privacy and anonymity on the blockchain are a crucial = part of its success in some applications.
If individuals or organizations are performing transac= tions on the blockchain, they may not wish this to be public knowledge.
Different blockchains have different levels of anonymi= ty and privacy built into the protocol.
As discussed earlier, public key cryptography is at the center of maintaining identity on the blockchain.
It uses a pair of public and private keys to make encr= yption and digital signatures possible.
At this point, we need to take a look a bit more into = the relationship between a user's keys and a user's actual identity.
The first thing to consider is that there is nothing a= bout a public key that ties it to its corresponding private key.
We've said that a digital signature verifies that an o= wner of the corresponding private key created the signature, but that is all tha= t it says.
Since private keys are secret, obviously it can't be possible for someone to determine a private key from a public key, at least= it shouldn't.
If you know a user's private key, you can calculate the public one, but the reverse is not true.
The other thing to keep in mind is that private keys a= re just numbers, and can't be tied to a person's actual identity, their real-w= orld identity.
Identity on the blockchain is just possession of the relevant private key, and even if someone guesses or steals that private ke= y, they can't learn its owner's actual identity from it directly.
The original blockchains did not have much in the way = of privacy and anonymity protection.
You can't tie public keys to private keys or private k= eys to real-world identities, which means that blockchain users have a limited amo= unt of built-in privacy.
However, every transaction on the blockchain is public= and stored there forever.
This means that a lot of information about the users' identity could be learned through sifting through the data stored on the blockchain to obtain the metadata.
Based on the repeated transactions to places like a co= ffee shop or a market, someone could get an idea of where an individual lives and their habits.
For businesses, repeated transactions may indicate bus= iness relationships that may lead to a loss of a competitive advantage if leaked.=
On basic blockchains, anonymity only goes so far.
The limited level of anonymity and privacy protections available on the original blockchain has inspired development of enhancemen= ts that increase privacy, while still allowing transactions to be verified and validated publicly on the blockchain.
This is an incomplete list of some of the mechanisms developed and implemented in various blockchains.
We'll start with zero knowledge proofs.
They use cryptography and cryptographic algorithms to = allow a user to prove knowledge of a secret without revealing the actual secret.<= /p>
A common example of this type of proof includes a colo= rblind person and two objects identical except for the color.
The colorblind person shows one object to the prover, conceals both objects, and then shows one to the prover again.
The prover then says whether or not they are the same object.
Since the only way of determining this reliably is tha= t the objects are different colors, the prover can prove the difference in colors without revealing the color of either object.
Another approach is stealth addresses.
Stealth addresses involve using one-time addresses to perform transactions on the blockchain.
A stealth address is just a one-time address that make= s it impossible to link a transaction to a known account.
What this does is prevents the data mining attacks on privacy that we discussed earlier.
We mentioned previously that transactions are digitall= y signed .
With ring signatures, all that can be determined from a transaction is that a member of a group signed it, but not the particular member.
The ability to see who is performing transactions with= whom is dangerous to user privacy and anonymity.
Protocols like CoinJoin mix several transactions together, so that it is difficult to pair senders with recipients.
Confidential transactions take advantage of homomorphic encryption, which makes it possible to perform mathematical operations on encrypted data.
This means that the data contained in a transaction ca= n be hidden from the public, while still allowing the network to verify that the transaction is valid.
Now, let's discuss how different blockchains implement= the various privacy and anonymity mechanisms available.
We start with the Ethereum.
Ethereum does not currently implement many real advanc= ed options for privacy or and/or anonymity.
In the current version, user anonymity is limited to t= he fact that no one can tie a public key to a real-world identity.
This is intended to change in the future though, and t= he Ethereum roadmap currently includes laying the groundwork for implementing = zero knowledge proof.
Hyperledger (Fabric) provides several options for priv= acy and anonymity.
At the lowest levels, users can achieve increased anon= ymity through channels which can further encrypt the data that's stored on the channel using keys only available to members of the channel.
At the next level, Hyperledger Fabric also allows user= s to perform private transactions.
In a private transaction, data is stored on the cloud,= but the hash of the data is stored on the blockchain.
This allows users to use the blockchain to ensure data authenticity without storing the actual data publicly on the blockchain.
Finally, Hyperledger supports zero knowledge proof, wh= ere a prover can demonstrate possession of some data without revealing the data itself.
These different levels of privacy and anonymity protec= tion gives users a higher degree of configurability on the Hyperledger Fabric blockchain.
Finally, Corda allows users to perform transactions ei= ther as a party or an anonymous party on their blockchain.
An anonymous party has the same level of anonymity protection as a basic blockchain, relying on the fact that public keys cann= ot be tied directly to real-world identities.
A party on the Corda blockchain reveals the real-world identity of the user which intentionally sacrifices anonymity for identity validation.
Public key cryptography gives each person a pair of ke= ys that work together:
o
Private keys
They can decrypt things that public keys encrypted. They can only be tied t=
o an
identity if the owner wishes.
o
Public keys
They can verify signatures made with private keys. They can only be tied to=
a
private key if the owner wishes.
The following are only some of the mechanisms develope= d and implemented in various blockchains:
§&nb=
sp; Zero-Knowledge
Proofs
A prover proves knowledge of a secret without revealing it.
§&nb=
sp; Stealth
Addresses
Using one-time addresses for sending/receiving transactions for an acco=
unt.
§&nb=
sp; Ring
Signatures
Type of digital signatures that lets any member of the group sign, but =
no
one can tell which one signed.
§&nb=
sp; CoinJoin
Transactions from several senders to several recipients are mixed toget=
her
to hide who is paying whom.
§&nb=
sp; Confidential
Transactions
Uses homomorphic encryption to allow transactions to be processed while
encrypted. Proves transaction value is in a range of values to prove that
overspending did not occur.
Zero-knowledge proofs=
use
cryptographic algorithms to allow a user to prove knowledge of a secret wit=
hout
revealing the secret.
Stealth addresses inv= olve using one-time addresses to perform transactions on a blockchain. A stealth address is just a one-time address that makes it impossible to link a transaction to a known account. This prevents the data mining attacks on privacy that we discussed earlier.
We mentioned previous= ly that transactions are digitally signed. With ring signatures, all that can be determined from a transaction is that a member of a group signed it, but not the particular member.
The ability to see wh= o is performing transactions with whom is dangerous to user privacy and anonymit= y. Protocols like CoinJoin mix several transactions together so that it is difficult to pair senders with recipients.
Confidential transact= ions take advantage of homomorphic encryption, which makes it possible to perform mathematical operations on encrypted data. This means that the data contain= ed in a transaction can be hidden from the public, while still allowing the network to verify that the transaction is valid.
§&nb=
sp; Ethereum
Ethereum currently does not have any advanc=
ed
privacy options, but this is planned to change.
§&nb=
sp; Hyperledger
1.
Channels: Subsections of the blockchain that
make transactions visible only to members.
2.
Private Transactions: Hashes of private data=
are
stored to publicly verify it on the blockchain.
3.
Zero-Knowledge Technology: Provers can
demonstrate knowledge of a secret without revealing the secret itself.
§
Corda
Parties on the Corda Network can be represented in one of two ways:
<=
![if !supportLists]>1.
Party: A public key and name
2.
Anonymous Party: Only a public key.
By the end of this section, you should be able to:
§ Explain how a blockchain is trustless.
§ Explain why a trustless system is more secure than a system that requires trust.
Just as there are benefits with blockchain technology,= there are also some challenges. Blockchain is a culmination of technologies that = have been blended to provide a trustless platform. Expect some challenges and use case justifications taking the old line of business apps to the blockchain.=
Let's recap the features of a blockchain that establis= hes trust:
§ Blockchain technology is about storing some kind of data (which are transactions in regards to the Bitcoin blockchain).
§ Blockchain is essentially transferring trust from an intermediary to technology.
§ Storing data in the blockchain is through cryptographic functions.
§ Private key/public key.
§ Collaboration through consensus.
All transaction data on a chained block is assumed to = be trustworthy.
The users base this trust on the fact that:
§ This data has not been tampered with
§ The blockchain is immutable.
Blockchains minimize the amount of trust required from= any single actor in the system. They do this by distributing trust among differ= ent actors in the blockchain as defined by the consensus protocols.
Blockchains have a shared ledger that gives us the abs=
olute
truth of the state of the system. It uses mathematics, economics, and game
theory to incentivize all parties in the system to reach a consensus (
Blockchain is a digital decentralized ledger.
Blockchains are important because they provide a safe = and secure way for people to make any type of transaction without having to tru= st anyone.
Blocks in a blockchain can be thought of as a sheet of paper. Blocks, just like paper, can hold any type of data on them.
When blocks fill up with data, transactions are hashed= into what is known as a Merkle tree. Merkle trees provide for an easy way to find any specific transaction in a blockchain.
A hash function is a one way function that takes any type of data and converts it into a unique character code. Merkle trees use hashing to convert every transaction in a block into= a 20-digit character code known as the Merkle root. Hashes are also useful wh= en comparing large amounts of data.
A block header is a hash of many things determined by = the blockchain, but most frequently consists of the previous block header hash,= the Merkle root of the current block, and the timestamp.
By including the previous block's header hash, blocks = are chained together.
Chaining is important because blockchains are kept on millions of nodes across the network.
Chaining allows blockchains to easily check and see if= any data was altered just by comparing the hash of the current header. If the h= ash is the same on every node, then the blockchain is the same. If the header h= ash is different in any way, then the different hashs blockchain is updated to match the majority of blockchains. This is what makes blockchains fault tolerant and immutable.
Blockchains are fault tolerant because if any one node= loses track, it will be updated to match the majority of nodes running the current blockchain.
Blockchains are immutable because the data on a block = can never be changed or deleted.
Contrary to a traditional database, every transaction = on a blockchain is made public, and everyone can write onto a blockchain. This requires users to be anonymous to avoid identities being tied to a specific transaction.
Anonymity is achieved through public key/private key cryptography. Your private key is for your eyes only. Your public key can be shared with the public. Your public key is the address you receive and send transactions from. To prove that your public key is associated with your private key, a digital signature is used. A digital signature uses math to = show a relation to your public key from your private key, without revealing your private key.
Anonymity poses a problem when it comes to trust. How = can we be 100 percent certain that anonymous users are being honest when adding transactions to a ledger that once added, cannot be changed or deleted. The answer is to validate every transaction before adding them to the chain. Th= is problem of validation is often referred to as the byzantine generals probl= em, and the solution is found with consensus algorithms like Proof of Work and Proof of Stake. These consensus algorithms take advantage of the fact that = the majority of users on a blockchain have a common interest to keep the blockc= hain honest. We will go further into some consensus methods in chapter 2.
Not all blockchains use anonymity however. Private blockchains allow for the use of permissions to control who can read and wr= ite onto a blockchain. Private blockchains often require trust, but are much mo= re efficient due to the lack of need for a consensus algorithm like Proof of Stake. A private blockchain would be useful when you want an extra layer of transparency and higher level of security than a traditional database might= be able to offer.
By the end of this chapter, you should be able to:
§ Discuss about governance and analyze governance in a blockchain.
§ Discuss about Proof of Work and Prof of Stake consensus, and their advantages and disadvantages.
§ Analyze examples of Decentralized Autonomous Organizations (DAOs).
§ Discuss the issues blockchain could solve in consortiums.
§ Summarize the advantages and disadvantages of a consortium blockchain.
Humans tend to a= ttract each other and build tribes, villages, town, cities, or empires. With that comes social norms among those who are living with or near each other. These norms have different ways of manifesting into existence, but the ones relev= ant to this conversation will be rules. It doesnt matter if the governance is the real world or the digital world, there are shared underlying principles within both. They are:
Governance can be undertaken by a government, market, network, or social system (family, tribe, etc.).
For a governance process to work effectively, the above three principles will need to play nice with each other. For example, the r= ules should be aligned with the overall participants' goals, and the rulers shou= ld enforce positive and negative actions within this governance structure.
Now that we have a simple understanding of governance,= lets analyze how this is taking place in both the standard world and the blockch= ain world.
Every business wants to make sure it's getting the bes= t out of technology spending.
IT governance is a formal framework that provides a structure for organizations to ensure that technology investments support business objectives.
Now we all know that, despite our best efforts, things= occasionally do go wrong.
A large part of modern governance efforts includes pla= nning for disasters in a way that ensures business continuity - the ability to re= main available to customers no matter what.
Modern decentralized solutions are most often created = in a cooperative or consortium format - a shared joint effort business organizations.
In these initiatives, it is important not only for cle= ar and comprehensive governance to be in place, but for that governance to be consistent across participating organizations.
These type of cross-organizational governance efforts represent an entirely new type of project initiative, and will require busi= ness analysts, solution architects, product and program managers, and executive leaders who understand the incredible potential and massive disruption that decentralized solution architectures bring to focus.
Governance is a process that can apply to states, corporations, non-profits, non-governmental organizations, partnerships, business relationships, project teams, and any other grouping of humans wit= h a purposeful activity.
To keep things simple, we are going to cover standard governance through a lens that most blockchain systems evolved from. They a= re:
§&nb= sp; Representative Democracy
§&nb= sp; Direct Democracy
With representative democracy, you ha= ve a select few who are voted upon by the people; those people have the power to suggest new rules. These rules are then voted upon by the select few. There= are many pros and cons to different governance systems. Let's examine the pros = and cons:
With a strict direct democracy, it is exac= tly that, direct. Any and all decisions made within that group will be voted up= on directly by the people, without an intermediary.
Two examples of semi-direct democracies would be Ancie= nt Athens back in 500 B.C. and specific parts (the Swiss cantons of Appenzell = Innerrhoden and Glarus) of current day Switzerland.= p>
Each and every blockchain ecosystem that has or is bei= ng created will need some kind of governance mechanism in place. When particip= ants (miners, developers, and users) in the network are interacting, ideally they are acting in a way thats best for the o= verall group. Being able to build a governance structure in a decentralized (somet= imes anonymous, as well) world has proven to be extremely difficult, but this is= a problem that many DLT companies are in the midst of solving.
Most governance structures in the blockchain ecosystem= are looking to achieve similar goals, such as:
§&nb= sp; Protocol changes and tech upgrades
§&nb= sp; Critical bug and vulnerability fixes
§&nb= sp; Using pooled funds for R&D.
These goals can be achieved through many different met= hods of governance. Some of the popular ones being discussed at the moment = are:
|
Futarchy |
Decentralized Autonomous Organization (DAO) |
Liquid Democracy |
Quadratic Voting |
|
Participants
in a system decide its values and those with the most info stake their id=
eas
by betting on the outcome |
Allows
for group governance through a combination of smart contracts and issuing
tokens. |
System
where everyone can vote for themselves or delegate their votes |
System of buying votes where each additional vote costs twice as much |
After all of this is decided, it becomes time for implementation, which is choosing the rig= ht mix of on-chain and off-chain governance. Let's examine these topics.= span>
In this type of gover= nance, rules for instituting changes are encoded into the blockchain protocol. This means that any decision being made is automatically being translated into c= ode (e.g. decisions concerning block size). Develope= rs propose changes through code updates and each node votes on whether to acce= pt or reject the proposed change.
Off-chain governance can be seen as decision-making th= at first takes place on a social level and is later actively encoded into the protocol by the developers. For instance, Bitcoin developers share their improvement proposals (BIPs) through a mailing list, whereas Ethereum colle= cts improvement protocols (EIPs) on GitHub.
Fred Ehrsam (Coinbase co-founder) argues that the Bitc= oin governance system resembles the checks and balances system of the US government. Just like the Senate, developers submit pull requests BIPs to t= he community, the miners take the role of the Judiciary who decides whether or= not proposals are adopted in practice. Lastly, the users are just like citizens= in a nation or state and can revolt and switch protocols or sell their tokens.=
By the end of this section, you should be able to:
§&nb= sp; Explain what is Proof of Work and Proof of Stake.
§&nb= sp; Describe the Proof of Work and Proof of Stake processes.
§&nb= sp; Explain the advantages and disadvantages of each.
Many different consensus mechanisms are needed in a decentralized world where there are no middlemen and where trust has t= ruly become decentralized with the trustless movement of value.
Consensus is a way to ensure the nodes on the network = verify the transactions and agree with their order and existence on the ledger. In= the case of applications like a cryptocurrency, this process is critical to pre= vent double spending or other invalid data being written to the underlying ledge= r, which is a database of all the transactions.
With consensus, there are different solutions tha= t fit different situations. When deciding to use a specific consensus mechanism, youre taking on an opportunity cost (e.g. secur= ity, speed, etc.). The main difference between consensus mechanisms is the way in which they delegate and reward the verification of transactions. Its impor= tant to mention that most blockchain ecosystems have a hybrid of different conse= nsus mechanisms. There is no need to choose one over the other.
Many public blockchain networks such as Bitcoin or Eth= ereum are designed around the concept of user anonymity.
All users on networks such as these are highly anonymo= us and the network makes no attempt to track or manage identity.
This is why you can view the details of a financial transaction between any two parties on a network like Bitcoin, but not at y= our local bank.
However, making users anonymous can have undesirable consequences.
People are more likely to act poorly or dishonestly if= they believe they are anonymous and their identity is not known.
This means that public anonymous networks need to take= extra steps to disincentivize bad behavior.
The most common method used today is something called = Proof of Work consensus.
Every node or computer on a Proof of Work network keep= s its own copy of the ledger.
Periodically, the nodes on the network need to stop and compare the latest block of transactions that they've recorded to ensure th= at the majority of them have recorded the same thing.
This process is called consensus and it begins with a guessing game.
Each node on the network competes to guess a random pi= ece of data called the nonce, and the first node to guess the correct nonce gets to share its copy of the most recent block.
And if the majority of the nodes on the network have t= he same block, that node wins a prize.
Proof of Work ensures that dishonest nodes would only = incur a cost trying to guess the nonce, only to be rejected by the rest of the network.
A node owner who decides to be dishonest will only rai= se their electricity bill while ensuring that they never earn any funds by participating or mining on the network.
Miners in the Bitcoin network are solving hard math pr= oblems to verify transactions and secure the overall network.
Within PoW we have Miners= , which are GPUs or ASICs chips running computational cycles to solve a math problem with the goal of reaching a set number previously provided to them. This set number is called a target, which is an SHA-256 hash with a long list of leading zeros and the difficulty (another term in the Bitcoin world) of t= his target adjusts every 2016 blocks (roughly 2 weeks), to ensure it takes roughly ten minutes for the miners to crack.
There are three major ingredients needed to find this target:
§ A nonce (number only used once)
§ The transactional data
§ The previous blocks hash.
This is all then hashed (combined) over and over with = the nonce changing each time until the hash created from these three ingredient= s is lower than the target provided.
Once the Miner has reached this target, theyre gift= ed with a transaction fee and mining reward (at the time this course was released, 12.5 bitcoins). The reward gets cut in half every 210,000 bl= ocks (roughly 4 years).
The next step is for the miner to broadcast to all the= other miners that they have achieved the set target and have confirmed the bloc= k. Once that has been completed, theyll move on to the next block.
A good analogy is a lock and its combination. It takes=
a lot
of work to figure out the combination, but once you do, its easy to verify=
.
Proof of Stake is a consensus mechanism that is being designed to take the place of Proof of Work.
Although Proof of Work has served us well for more tha= n 10 years, there are some concerns about its current state.
Let's talk briefly about some of those concerns.
First, there's concern over energy consumption.
Proof of Work consumes a lot of electricity, and most = of that electricity is currently generated by non-renewable sources.
Public blockchain networks currently have a disproportionately large carbon footprint, and that is a big concern to many people.
Secondly, there's concern over specialization.
In the early days of Bitcoin, it was profitable to mine using consumer-grade computer hardware.
Many people repurposed old laptops, desktops, smartpho= nes and more to earn a little extra money mining Bitcoin.
Now, over the years, hardware makers have started crea= ting highly-specialized chipsets designed just for Proof of Work mining, each generation of chips rendering the previous one obsolete.
In order to be profitable as a miner today, you must s= pend a large sum of money on highly-specialized hardware with a very short lifespan before the next generation renders it obsolete.
In response to this evolution, mining has gone from a = large number of widespread small-scale operations to a small number of highly concentrated massive operations.
Finally, there's concern about centralization.
Blockchain and Web 3.0 technologies are all about decentralization and keeping any one participant from amassing a disproportionate amount of power, influence or control over the network.
Massive scale Proof of Work mining farms have concentr= ated in a small number of places around the world with the lowest electricity co= sts, creating what many believe to be an over-centralized distribution of nodes.=
This has led many in the blockchain space to look for a consensus mechanism which offers the same reward-punishment model as Proof = of work, but without the guessing game component which consumes so much energy= .
One leading contender is called Proof of Stake.
Proof of Stake works by replacing the guessing game wi= th the wager.
Each node can wager on what they believe the correct transactions to be for the current block.
In order to participate, a minimum wager or stake must= be placed.
Nodes who wager correctly are rewarded, while nodes who wager incorrectly, not only give up a reward, but they also lose their wage= r.
Proponents of Proof of Stake believe this creates the = same incentive model to node owners, while removing the costliest component of t= he current approach.
It's important to understand that there's a lot more t= o both Proof of Work and Proof of Stake, and these explanations really only outline the high-level details.
We'll cover both protocols in greater detail later on = in this course.
And there's also a wealth of information online for an= yone who really wants to dive in and learn the details.
With Proof of Stake (PoS) = we have Validators Forging, instead of "Miners" "Mining"= ;. There are no computational cycles running through massive amounts of math problems trying to solve a problem like PoW. Wi= th PoS, we have validators sending a special type of transaction across the network, which gets locked into a deposit (otherwise known as validator pool) and thats called staking.
Once this validator has thrown his hat into the prover= bial arena, then an algorithm pseudo-randomly selects a validator during each ti= me slot (for example, every period of 10 seconds might be a time slot), and assigns that validator the right to create a single block. This block must point to some previous block (normally the block at the end of the previous= ly longest chain), and over time, most blocks converge into a single constantly growing chain.
The next step is for the validator to validate a group= ing of transactions. Once thats completed, they receive their staked funds back, = plus the transaction fees (sometimes rewards when coin supply is being inflated = from time-to-time) for that block.
If the validator decides to act in a bad way (i.e. bad actor) and validate fraudulent transactions, = they lose their stake thats being held at the moment and are booted from the validator pool going forward (losing rights to forge). This is a built-in incentive mechanism to ensure they are forging valid transactions and not fraudulent ones.
By the end of this section, you should be able to:
§&nb= sp; Analyze examples of Decentralized Autonomous Organizations (DAOs).
§&nb= sp; Explain how DAOs will be governed.
Let's discuss governance with autonomy.
Let's jump 20 to 25 years into the future and see where we've gotten with AI and autonomous drive.
Driverless cars have now evolved to the point where a company can own a fleet of autonomous vehicles all driving in a variety of directions, moving items as well as people.
But it's more than just that. Each car is pre-programm= ed with a set of guiding principles.
For example, don't hurt humans, reach X percentage of profits within the month, maintain a set percentage of holistic health, etc= .
Consider the following scenario: A vehicle arrives to = pick up a passenger for transport within a set time frame to take them to their scheduled meeting.
The passenger is running late and therefore decides to= take advantage of the option to pay an extra fee for an expedited route.
Conceivable solutions to provide t= his options could include designating a lane on the highway for users pa= ying the premium or sending micropayments to other vehicles in exchange for adjusting their travels to create a clear path for the expedited vehicle.= p>
Once the passenger has been delivered to the appropria= te destination, the vehicle recognizes the need for maintenance after running = an internal diagnostic.
After repairs are completed, the vehicle heads off to a charging station and then moves on to the next customer.
This can eventually be applied to blockchain governanc= e.
More specifically, decentralized autonomous organizati= ons.
This is a concept that quickly manifested itself after= the Bitcoin white paper spread and people began to run through thought exercise= s.
As our technology advances, the world around us become= s more and more automated.
Take securities trading, for example. In the 1950s, ex= perts began designing the algorithm and rules that an automated trading system sh= ould follow.
In the 1980s, technology began catching up and those algorithms could finally start to be implemented.
Systems improved in the 1990s.
And in 2008, the world's first fully automated trading system, Betterment, went live.
Just six short years later, more than 75% of shares tr= aded on US exchanges were made by fully automated systems.
As we continue to use technology to automate more and = more of our business processes, the concept of a DAO, or a Decentralized Autonom= ous Organization, has emerged.
The basic idea behind a DAO is simple.
Most business processes are governed by a set of well-defined rules and procedures.
These rules and procedures can be codified as smart contracts on a decentralized network, thus, automating business process.
This decentralized nature of Web 3.0 technologies like blockchain makes it much more fault-tolerant, as well as providing a built-= in layer of redundancy, backup and error correction.
Consider the following example set sometime in the near future, when fully autonomous vehicles and consumer grade artificial narrow intelligence are common.
An entrepreneur notices a lack of ride-sharing services available in her town and decides to enter the market.
She saves enough capital to purchase a fully automated vehicle, as well as an AI Deep Learning system to analyze traffic and demand patterns and design optimal routes for the vehicle to cover.
Now, over time, this single vehicle earns enough to fu= nd the purchase of a second automated vehicle.
The business is able to manage its own operations, forecasting and modeling, and grow with little to no human intervention.
This is the conceptually ideal model of a DAO.
Decentralized Autonomous Organization (DAO= ) is a complex stack of smart contract= s.
Its important to understand that, at the moment, ther= e is no such thing as a completely autonomous DAO. There are specific parts that= are autonomous and others that are not so autonomous.
In simple terms, a DAO is an organization that runs on= a stack of computer programs (called smart contracts in the blockchain world) that are all interconnected to maintain a set of pre-programmed rules that = have been previously voted upon by a community.
When thinking about regular corporations stripped all = the way down to their bare bones, they are basically different groups following rules, responsibilities, and duties given from those sitting at the top of = the organization. The bigger they are, the more complex these pieces become. At= the moment, a DAO's goal is to automate this complex system piece by piece.
Within each DAO, there is a kind of pooling process for humans to contribute new rules into the system. These rules are then presen= ted to the community and voted upon, based on the DAOs previously created rules. These new rule commitments will need majority agreement (may be different f= or each DAO) from the community to make this rule real. If this new computer-c= oded rule is accepted by the community, then it will be placed into the stack of other computer coded rules to improve the overall autonomous organization.<= /p>
By the end of this section, you should be able to:
§&nb= sp; Discuss the issues blockchain could solve in consortiums.
§&nb= sp; Summarize the advantages and disadvantages of a consortium blockchain.
Were focusing on governance in the consortium space, = not governance within an enterprise company. So what= is a "consortium"? A consortium is just a grouping of institutions (possibly individuals) getting together to achieve a mutual go= al.
This goal can be setting some standard for their indus= try (Department of Justice), selling product (Airbus), sharing resources (Universities), etc. In a consortium, the only real obligation you have to others who are taking part would be providing resources for specific tasks = and sticking to the rules laid out prior to you joining. Within blockchain, the= re are many different industries creating their own consortiums, such as finan= cial services, life science and health care, energy, media and telcos, and = the public sector.
Governance becomes much easier when its in a controlled environment, with each member agreeing upon set rules prior to jumping in with everyone else. Governance structures vary by industry and profit vs. non-profit, so there will be no set governance model everyone us= es, but there are two weve come across in the blockchain space.
§ One is including the formation of smaller subgroups to work on specific issues.=
§ The second is providing several levels of potential engagement, ranging from participation in monthly calls to active technology development.
The point we would like to get across here is that a consortium governance model is currently more efficient than most decentral= ized blockchains.
Almost all consortiums up to this point have been permissioned and not decentralized permissionless blockchains, which is an opportunity cost most companies make when joining. At a high level, a permissioned blockchain is just that, a chain in which others mus= t have permission to operate on. So, all the nodes operating on a permissioned cha= in have been verified by the central institution that is the authority of the network and the transactions that are confirmed dont necessarily have to go through all the nodes.
These consortium blockchains have historically taken t= wo approaches:
§ Business-focused consortia<=
/b>
They aim to build and operate blockchain-based business platforms to solve a
specific business problem (e.g. Digital Trade Chain focused on cross-border pay=
ments).
§ Technology-focused
consortia
They seek to develop reusable blockchain platforms based on technical stand=
ards
(e.g. Hyperledger) .
There are some consortiums that do a hybrid of both bu= siness and technology, such as R3. Examples: Hyperledger, R3, Ripple, Digital Asset Holdings, Corda, B3i, EWF, etc.
Below are some of the=
pros
and cons to consortium blockchains:
Many different consensus mechanisms are needed in a decentralized world where there are no middlemen and where trust has truly become decentralized with the trustless movement of value.= p>
Consensus is a way to ensure the nodes on the network verify the transactions and agree with their order and existence on the ledger.
The most prominent consensus method is Proof of Work. = Proof of Work is a process that has miners find a nonce or a number that is combi= ned with the other data in the header. The nonce must change the header hash to= be smaller than a specific number defined by the blockchains difficulty. A big issue with the Proof of Work consensus process is that it requires a lot of time and electricity to complete. The incentive for mining is often cryptocurrency.
Proof of Stake is the second most prominent consensus method. Proof of Stake has nodes put up a stake to be chosen as the next bl= ock creator. When a block is chosen, the creator will receive the transaction f= ees associated with that block. If a block winner attempts to add an invalid bl= ock, they lose their stake.
Proof of Stake solves many problems that Proof of Work= has. One of these problems is the electricity requirement that is associated with miners finding a nonce.
There are many other consensus algorithms, including P= roof of Capacity, and Proof of Burn.
Because blockchains are distributed, governance is usu= ally not determined by a single point of authority. It is determined by the user= s. If the users like a change initiated, they have the option of using that ch= ange within their blockchain.
Consortium blockchains can determine who has governanc= e in a blockchain. They can control who can write onto the blockchain and who has access to what data. Consortium blockchains have lower energy costs, and hi= gher speed, but at the cost of requiring trust among users.
By the end of this chapter, you should be able to:
§ Discuss immutability in blockchains.
§ Explain what transparency is and review advantages and disadvantages of append-only ledgers.
§ Explain how blockchain is looking to be autonomous through smart contracts.
§ Discuss how blockchain removes third party intermediaries and analyze centralized v= s. decentralized ledgers (blockchain).
§ Discuss how blockchain solves the problem of double spending.
By the end of this section, you should be able to:
§ Define immutability.
§ Explain how blockchain is immutable.
§ Distinguish between traditional database vs. blockchain immutability.
Immutability is when something is unable to be changed.
"Immutable" simply refers to the permanence = of data.
Anything we call "immutable" we understand t= o be permanent and unchanging.
Your local weather forecast - that's mutable, it chang= es all the time; the stars in the sky, those are immutable, they seem permanent fr= om our perspective.
One of the benefits of blockchain and many other Web 3= .0 technologies is the promise of immutability.
The data recorded on a blockchain system can never be altered, edited, changed, or deleted once it has been recorded.
As this data is stored in many different locations, ch= anging or removing a copy of the data in one single place, or in a limited number = of places poses no threat.
Blockchain goes further than this though.
In addition to recording facts or data points, blockch= ain also has the capacity to record who endorses or agrees with those recorded facts.
Think of the difference between a piece of paper, and a contract.
A piece of paper can contain any data, true or not.
A signed contract becomes more than a piece of paper b= ecause those signatures represent who agreed with the facts recorded on the paper = at the time of signing.
Blockchain provides a digital implementation of t= his process, and can be an immeasurably valuable tool when you need to cap= ture not only what happened, but who was involved as well.
Imagine the new opportunities that arise when organizations can safely and securely share their most critical data with o= ne another, with the trust that the data they're seeing hasn't been compromise= d or altered.
The very nature of centrally-operated databases cant = be completely immutable, but thats the case for blockchain as well. A centrally-run database can embed things into it with features that mention immutability (unchangeable). But if there is a central authority, they have= all the ability in the world to override that feature.
Another point to keep in mind is that immutability has= been around for many years, just like the majority of the tech used via blockcha= in; it is the combination of these that makes it unique.
Let's review the aspects of the public blockchain that improve the chances of it being immutable.
There are many different variables, but the main one is consensus. In a blockchain, it refers to the logs of = transactions which are created by consensus among the chains participants. The bas= ic notion is that once a blockchain transaction has received a sufficient level of validation and posted on the chain, it can almost never be replace= d or reversed or edited.
If all the nodes within the network (Bitcoin specifica= lly) are working to solve a really hard math problem by running many computers simultaneously, the chances of anyone overriding that are slim to zero.
But, if someone wanted to undermine the immutability o= f the Bitcoin blockchain, heres how they would do it:
§ First, they would install more mining capacity than the rest of the network put together, creating a so-called 51% attack.
§ Second, instead of openly participating in the mining process, they would mine their own secret branch", containing whichever transactions they approve and censoring the rest.
§ Finally, when the desired amount of time has passed, they would anonymously broadcast their secret branch to the network.
Since the attacker has more mining power than the rest= of the network, their branch will contain more Proof of Work than the public o= ne. Every Bitcoin node will therefore switch over since the rules of Bitcoin st= ate that the more difficult branch wins. Any previously confirmed transactions = not in the secret branch will be reversed and the Bitcoin they spent could be s= ent elsewhere. The computing power required to achieve this is enormous and probably only theoretical, but its important to consider.
One other less technical and malicious example would b= e from the Ethereum hard fork that directly happened after the DAO hack. In this example, the majority of the Ethereum nodes in the network decided to update the software preventing those hackers from withdrawing the cryptocurrency = earned (stolen). This update could not be enforced, since every Ethereum user cont= rols their own computer. Nonetheless, it was publicly supported by Vitalik Buterin, Ethereum= s founder, as well as many other community leaders. As a result, most users c= omplied, and the blockchain with the new rules kept the name "Ethereum". A minority disagreed with the change and continued the blockchain according to its original rules, earning the title "Ethereum Classic".
By the end of this section, you should be able to:
§ Explain what transparency is.
§ Discuss what CRUD (Create, Read, Update, Delete) is in a traditional database.
§ List advantages and disadvantages of append-only ledgers.
Transparency: Anything that is see-through, whe= re there is very little fog or obstruction in the way. Just like immutability, transparency comes on a spectrum. Certain things are more transparent than others. In the context of business/technology, this can be seen as a way of operating that is easy for others to see what actions are being performed.<= /p>
For example, open source pr= ojects where all the source code is available for the masses.
Before we jump into how blockchain technology can be s= een as transparent in certain aspects, lets review the traditional CRUD method us= ed by most databases.
In a traditional database, a client can perform four functions on data: Create, Read, Update, Delete. In a traditional database, there is usually an administrator, the authority giver who allows certain known participants in the database to do more than read/create; it allows them to update (change) and/or delete.
Due to the fact that the administrator is controlling = who has access and who doesnt, its easier to track these changes and prevent actors from tampering. In the public blockchain world, this isnt necessari= ly the case.
Within the public blockchain world, every full node on= the network is its own administrator, where it can Create (= e.g. add) and Read; this is also known as Read/Write access (e.g. append-only). These nodes only add more data over time in the form of blocks, but all previous data is permanently stored and cannot be altered.
§&nb= sp; Read: query (e.g. search) and retrieve data from the blockchain
§&nb= sp; Write: add more data onto the blockchain.
For example, if the blockchain has recorded that our Bitcoin wallet has 1 million BTC, that figure is permanently store= d in the blockchain. When we spend 200,000 BTC, that transaction is recorded onto the blockchain, bringing our balance to 800,000 BTC. However, sin= ce the blockchain can only be appended, our pre-transaction balance of 1 million BTC also remains on the blockchain permanently, for those who care = to look. This is why the blockchain is often referred to as an immutable and distributed ledger.
By the end of this section, you should be able to:
§ Discuss what it means to be autonomous.
§ Explain how blockchain is looking to be autonomous through smart contracts.
§ Explain how smart contracts work.
Autonomy: Independence or freedom, the ability = to make your own decisions without being controlled by anyone else. This sense= of freedom can be at the macro level of a country or at the micro level of a person.
As children and adults, we all want a little autonomy = in our lives, careers, or relationships, but its just a matter of how much autono= my one truly wants and can handle.
The blockchain world is looking to solve all of this complexity with autonomy from intermediaries via automated smart contracts.
In the traditional world of doing any kind of transact= ion with another party, there tends to be a lot of administrative paperwork, wi= th third parties intervening every step of the way. Some of this is needed, but most of it becomes wasted time and effort which could be spent elsewhere. Depending on how complex a transaction is between two parties, designated specialists (contract drafters, signatories, regulators of the contract execution, authorities to help with disputes, etc.) can make the process mo= re efficient.
This complexity can be seen within many areas of life.= Take a moment to dissect the backend of certain services or products you use and this concept will become exposed very quickly.
Autonomy in the blockchain world can be seen from many different angles. We are going to focus solely on smart contracts= b> in this section, due to the amount of autonomy it gives everyone involved. The concept of smart contracts has been around for a long time and was first proposed by Nick Szabo, who coined the term in 1994. The most simplified explanation is:
"IF THEN ELSE" statement, which means IF X happens, THEN do Y, ELSE do Z.
Take this concept and apply it to two or more parties,= all interacting on a mutually agreed upon contract that executes based on their actions (or non-actions). An example of a smart contract could be, "if this happens before the end of the year, then you pay me, else I pay you&qu= ot;.
These "smart" contracts arent very smart, at least for now. Thats due to the simple explanation above because these contracts are "if, then, else" statements, which can vary in complexity based on how theyre stacked.
At the present moment, they can't make decisions witho= ut human intervention, or AI, which is a highly debated topic at the moment by many neuroscientists/philosophers.
Anyone is able to create their own smart contracts without a central authority giving the right to do so. These contracts are executed without too much human intervention, and theyre stored on blockch= ain technology which provides a sense of permanence. These are three of the main attributes that can bring more autonomy to exchanging information between parties. Setting up a pre-agreed upon contract thats coded into a blockcha= in and executes automatically when certain actions are taken is one step in the direction of not only improving our autonomy as individuals or companies, b= ut shifting wasted resources (middle men/women) toward more impactful work.
The first generation of blockchain platforms, collecti= vely known as the "Blockchain 1.0"
networks, were capable of capturing and recording data= , but not acting upon it. Bitcoin, the
world's first mass-scale blockchain, was designed to c= apture and record the transfer of Bitcoin from one owner to the next. At the time, nobody was envisioning blockchain as a platform on top of which applications and solutions could be built.
The release of Ethereum in 2015 changed this model. "Blockchain 2.0" was born, and now blockchain networks could not = only capture data, they could act upon it as well. All of this was made possible= by the introduction of a technology called "Smart Contracts".
Put quite simply, a Smart Contract is some computer co= de deployed to a blockchain network.
Users can transact with the Smart Contract just as they would another user, except when transacting with a Smart Contract, the rules defined in the code are used to process the transaction. This advancement n= ow allows blockchain solutions to manage and automate processes, and record th= eir results on a permanent, immutable, secure ledger shared with all relevant parties.
Consider the sale of a used car. Alice lists her car f= or sale, and offers a guarantee to any buyer that the car will be trouble-free= for 1,000 miles. Bob looks at Alice's car and makes her an offer of $5,000. Ali= ce and Bob agree that Alice will take half the purchase price now ($2,500), and the other half if the car has had no major issues in the first 1,000 miles = of Bob's ownership. A Smart Contract could be created between Alice and Bob. T= he Smart Contract would hold the remaining $2,500 in escrow, and if Bob had an issue with the car, he would report it to the Smart Contract. After 1,000 miles t= he Smart Contract will determine how much of the remaining funds are due to Al= ice and how much should be returned to Bob using the rules Alice and Bob initia= lly agreed upon.
All details about the transaction would be recorded on= a permanent, decentralized ledger which could be used at any point in the fut= ure to answer any questions about the transaction between Alice and Bob.
By the end of this section, you should be able to:
§ Describe traditional third-party intermediaries.
§ Explore how blockchain removes third party intermediaries.
§ Analyze centralized ledgers vs. decentralized ledgers (Blockchain).
In our current world of transactions, theres always a= third party to assist with connecting the sender and receiver. This has always be= en the most efficient way to move something from Point A to Point B. But with a third party making the connection comes the need to trust that theyll get whatever is being sent in an efficient, economical, and effective way. This trust is open to human and process error. But weve discovered through experimentation that certain use cases could be automated via smart contrac= ts.
One example is cross-border payments. Sending money fr= om one country (border) to another country (different border). The major issue with how this is traditionally done today (e.g. correspondent banking) is that certain transactions end up stopping off at = 710 different checkpoint banks. This constant stopping is making the money move= ment more expensive (each bank takes a fee), slower, and less reliable (sometime= s it might never make it). This type of transaction is heavily reliant upon third parties to facilitate the movement of information (money, in this case).
Blockchain technology has been shown to provide many benefits, but one of the most prominent and immediate benefits is removing middlemen (third parties) from a variety of processes. There is a long list= of examples for middlemen currently being removed, such as:
§ Energy distributors
§ Payment networks (Visa and Mastercard)
§ Content distributors (YouTube, Facebook, Medium, etc.)
§ Central exchanges (NASDAQ, London Stock Exchange, New York Stock Exchange, etc.)
§ Cloud database providers (AWS, Azure, etc.).
How is the blockchain world removing this middleman? T= he answer is all around trust. Within the public blockchain world, where every= one is theoretically anonymous, there needs to be trust so were able to exchan= ge valuable things without the concern of bad actors. Trust is built into the consensus mechanism that weve mentioned multiple times throughout this course. This incentivizes all the participants to help secure and validate good actions throughout the network. With that built-in "trustless" trust, we= re able to remove those middlemen that provide no additional value, plus it co= uld potentially increase the efficiency based on which public blockchain is bei= ng used.
Below, you will find
comparison between centralized ledger vs. blockchain.
By the end of this section, you should be able to:
§ Explain the concepts of digital currency and double spending.
§ Discuss how blockchain solves the problem of double spending.
§ Review the problems of digital currency before blockchain.
Digital Currency: Electronic money available on= ly in the digital world and not in the physical world.
Bitcoin, the world's first blockchain, was created as = part of an attempt to create the world's first truly viable digital currency.
Bitcoin was not the first attempt to create a digital currency, but it was the first which was able to successfully solve a long-= standing problem - the "Double Spend" problem.
The Double Spend problem is quite simple.
Let's say Alice owes a debt of $5 to both Bob and Caro= l.
Alice's total debt is $10, but let's assume she only h= as $5 currently.
If Alice's transactions were recorded on two separate ledgers, it is possible that one ledger would show she paid $5 to Bob, while the second ledger may show she paid $5 to Carol.
It would be impossible to tell who actually got paid.<= /p>
This is the double spend problem - any financial ledge= r MUST prevent Alice from spending her $5 more than once.
Digital assets are particularly vulnerable to the doub= le spend problem as we generally design them to be easy to copy and distribute= .
If you've got a great picture you took with your phone= , it's easy to post one copy to Facebook, another copy to Instagram, then you might text a copy to your spouse, and email a copy to your parents.
We live in a world where digital assets are easy to co= py and distribute, by design.
A digital currency should NOT be easy to copy and dist= ribute though.
It was overcoming this technical challenge that lead to so many failed attempts at digital currency be= fore Bitcoin, and the innovations that the solution to this problem has delivere= d are now being leveraged to track and manage many different types of assets and = data that we never could easily manage before.
It is this possibility of building tools and solutions= that were never before thought possible that has so many people excited about the blockchain revolution!
Back in the early 1990s, developers, cryptographers, = and different groups of people were trying to solve the double-spend problem as= it related to digital cash, previously known also as electronic cash. Double spending within Bitcoin is the act of using the same bitcoins (digital money files) more than once.
If I buy an apple for $1, I cannot spend that sa= me $1 to buy an orange. If I could, money would be worthless since everyone would have unlimited amounts and the scarcity that gives the currency value would disappear. The network protects against double-spending by verifying each recorded transaction within the blockchain utilizing a Proof of Work (PoW) mechanism (explained in the previous section).= p>
Bitcoin was the first decentralized protocol to solve = this problem and now more protocols are following, such as: Proof of Stake (PoS), Delegated Proof of Stake (= DPoS), Directed Acyclic Graphs (DAG) structures, Proof of Authority (PoA), etc.
Today, when someone mentions digital currency, usually Bitcoin or crypto is the first thing that comes to mind, but digital curren= cy had a long history before Bitcoin popularized it. This history goes all the= way back to 1983, when David Chaum introduced the i= dea of digital cash in a research paper. Then, in 1992, he founded DigiCash, an electronic cash company, which eventually went bankrupt in 1998 due to adoption (buyout by another financial institution).
There were many other attempts to create digital cash = over the years, but many failed due to a variety of reasons, such as:
Other attempts include:
§ CyberCash in 1994 (failed after the Y2K bug of 2000)<= /p>
§ E-gold in 1996 (sunk by continuous money laundering, hacking, and extortion)
§ Liberty Reserve in 2006 (shut down in 2013 due to this becoming a great hangout spot for cybercriminals).
Blockchain is an immutable ledger. Once a bl= ock has been added to the chain, the data in the block is permanent and ca= nnot be altered or deleted.
This append-only ledger needs a way to verify val= id transactions and delete invalid transactions before a block is added to the chain.
Transactions cannot be validated and added chronologic= ally, because that would allow for a double spend attack. Double spending oc= curs when an address rapidly initiates two transactions. One of these transactio= ns could be invalid, but, because they are initiated at the same time, both transactions could be approved. To solve this, transactions = are put into a pool of unverified transactions, then nodes add t= hese unverified transactions to a block.
When a block is full, consensus occurs, which is a pro= cess that selects the owner of a new block to be added to the chain. When consensus is achieved, nodes then validate each transaction in the selected block by referencing transactions associated with an address. = ;
Transactions can also be added in the form of smart contracts. Smart contracts are business logic in the form of self-executing code that lives on the blockchain.
By the end of this chapter, you should be able to:
§ Discuss when blockchain is a suitable alternative to a traditional database.
§ Analyze examples of good and bad blockchain use cases.
§ Analyze blockchain use cases: healthcare, voting, identity management, land records= and government, supply chain, IoT, energy.
§ Discuss about the potential of blockchain.
By the end of this section, you should be able to:
§ Summarize the industries being changed by blockchain.
§ Explain when blockchain is a suitable alternative to a traditional database.
§ Analyze examples of good and bad blockchain use cases.
We are already seeing blockchain disrupt many industri= es, including: healthcare, automotive, identity, government, real estate and insurance.
In this chapter, we will hear from those who are leadi= ng these projects. Companies including IBM, Luxoft= span>, and counties such as Cook County, Illinois (USA), are using blockchain to solve problems, save money, and change the way data is stored= and exchanged.
One important thing to keep in mind as you're evaluati= ng blockchain, is it's like hot sauce.
And I want to give credit where credit is due for this analogy.
This was inspired by a friend of mine, Samson Williams= , a thought leader in the blockchain space.
But Samson loves to talk about blockchain being a lot = like hot sauce.
Hot sauce is surprising because you can put it on a nu= mber of things and it really tastes good.
But there are some things hot sauce just doesn't belon= g on.
You'd never put hot sauce on an ice cream.
Understand that blockchain is like hot sauce - there a= re a lot of areas you can add a little splash of blockchain to, and end up makin= g a much better and more compelling solution.
But there are some areas that you can't add blockchain= to without making things a lot worse.
And just like hot sauce, there is a big misconception = that blockchain is an all-or-nothing proposition, that if we're going to archite= ct and develop a solution on blockchain, we either have to build something that exists entirely on blockchain, or we need to build something that exists entirely on conventional technology.
The truth is that like hot sauce, blockchain is really= best when it's combined with something.
If you were hungry and poured yourself a big bowl of h= ot sauce, not only would you be unsatisfied and unhappy, but you wouldn't want= to repeat the process again.
That's the same way with blockchain.
If you are looking at building a solution completely a= nd entirely on the blockchain, without exploring some of the amazing potential that you get by combining blockchain with conventional technology, then you probably got a bad recipe.
So, when you're thinking about blockchain, and how to = add it to your personal and professional life, understand that it's not a meal all= by itself.
It's just a little splash of hot sauce you put on some= thing that already works pretty well.
One area getting a lot of attention in blockchain righ= t now, is campaign finance and campaign donations.
There are some really interesting and compelling use c= ases, ways that we might be able to use blockchain to do new and innovative things around campaign finance that just aren't practical or feasible today.
Let's say that I'm running for office and you want to support my campaign.
Well, today, you might write me a thousand dollar chec= k and I get all 1,000 of those dollars right away to use for my campaign.
Maybe, we want to use blockchain to empower voters to = keep their politicians more accountable to the promises they make on the campaign trail.
Consider the following scenario.
Let's say, that instead of donating a thousand dollars= to my campaign, you write a smart contract on the blockchain to manage campaign donations.
You give that smart contract a thousand dollars instea= d.
That smart contract has been programmed with the terms= and conditions under which it is able to release those funds to my campaign.
I might get two hundred and fifty dollars of that thou= sand initially to use for my election.
If I get elected, the remaining $750 can stay in the s= mart contract.
Otherwise, it gets refunded to you.
Let's say, I do get elected. Perhaps, I don't get the = second 250 of that thousand dollars until a year in off= ice, if I fulfilled three or more of my campaign trail promises.
And then, we might say as a final step, I get the rema= ining five hundred dollars to use for my reelection, only if I fulfilled 80% or m= ore of my campaign promises during my first four-year term in office.
This would put a lot of power back in the hands of vot= ers and would keep politicians accountable for the promises they make, long aft= er election day.
While things like this certainly are possible with conventional technology, they're not very practical or feasible.
Blockchain and smart contracts puts this power back in= the hand of voters and has the potential to radically reform campaign finance a= nd campaign donations.
One of the coolest things about blockchain is some of = the unintended consequences a good blockchain solution might have.
Let's look at an example.
Right now, there is a lot of attention being given to = how blockchain might be used, in general, for supply chain relationships and, specifically, in the food supply chain.
Let's pretend that you have a very young child and your child has a serious pesticide allergy.
So, of course, when you go to the grocery store, you m= ake sure that you only buy the produce in the produce section that has the USDA organic label.
It's just a little sticker that goes on the produce.= p>
So, you buy your produce and you stand in the checkout= line, and you feel pretty good that the produce you're buying actually is organic= and has been treated with all-natural pesticides, and won't make your young chi= ld sick.
But sometimes you wonder, standing in line, how do I r= eally know? How do I really know that someone didn't just print up a bunch of the= se stickers in their basement and apply them at the last minute?
The blockchain can go a long way to solving that probl= em and providing much greater insight.
Let's say, you're standing in the grocery store one da= y, and instead of the easily forged stickers, you're able to pull out your phone a= nd scan a QR code.
When you scan that QR code, instantly on your phone the entire lifecycle of that piece of produce pops up.
You can see the date that it was planted on the orchar= d.
You can see after it was planted that an organic pesti= cide company came along and treated it with an all-natural pesticide.
You can even verify that the pesticide is natural by s= eeing the ingredient list in that pesticide.
And finally, you may see who actually delivered that p= roduce to the store.
Let's say that there's a new green electric trucking c= ompany out there - Ed's Electric Trucking.
Ed has seen all the fancy new Tesla semis. He thinks t= hey're great and he is committed to providing a transportation and logistics compa= ny which is also environmentally friendly.
Now, in today's world, you don't have a way of knowing= about someone like Ed and his electric trucking company.
There just aren't good ways for folks in the B2B space= to communicate their business value directly to consumers.
This is an interesting potential byproduct of using blockchain and smart contracts as a business solution.
Not only would I, as a consumer, have greater insight = into the origin of that produce and feel much better standing in the checkout li= ne, but maybe what Ed's doing resonates with me personally.
Maybe I'm a very green-conscious consumer.
I didn't know there was such an organization as Ed's.<= /p>
And I have to buy a few more things while I'm at the s= tore, besides produce. I have to buy some deodorant, some shaving cream, and some laundry detergent.
So, when I buy that deodorant, shaving cream, laundry detergent, I only buy the ones that were delivered by Ed's Electric Truckin= g.
This gives Ed and other B2B players a new and exciting= way to establish brand and gain mindshare with the consumer that they currently don't have.
Certainly, it was not the original problem we went to = solve with blockchain, but many times, when we apply blockchain to a real-world problem, we find out there are a lot of unexpected benefits just like this.=
So, look for blockchain not just to transform the area= s that we're aware it might make a difference in, but also to provide some new exciting and unintended benefits.
Another area ripe for disruption from blockchain and s= mart contract technology is law enforcement.
And this is a very interesting and potentially life-ch= anging area.
We've seen a number of unfortunate tragedies here in t= he United States, because individuals who shouldn't be allowed to own a certain class of weapon are able to.
The primary reason this happens is because various law enforcement agencies at the federal, state, city, and local level just don't have a good shared infrastructure they can use to communicate back and forth and share pertinent information.
An individual may have been barred by the military for= an indiscretion in their past from owning a certain type of weapon.
Unfortunately, and we've seen real-life examples of th= is, that individual is still able to obtain that class of weapon, simply because that information has never been communicated to the state or local law enforcement or to local arms dealers.
This has resulted in a number of unfortunate tragedies= which could be prevented in the future through the smart and judicious use of sma= rt contracts and blockchain.
Not only is this an area right for disruption, but it'= s an area where using technology such as blockchain m= ay ultimately result in saving human life.
Another area getting a lot of attention with blockchai= n and the potential use of smart contracts is the music industry.
Not only does blockchain and the effective use of smart contracts allow us to remove a lot of the intermediaries, recording studios= and distribution houses, allowing consumers to purchase music directly from the= ir favorite artists, it also allows the artists insight in how consumers are using, sharing and spreading their music.
Let's say that your favorite new artist comes off with= an album.
You and all your friends rush out the first day to buy= a copy of that album.
But, while your friends simply go home and listen to i= t over and over, you tell everyone who hasn't bought the album how great it is and= , as a result of your efforts, 10 additional albums are sold.
Now, if I'm that artist, presently I don't have insigh= t into that kind of data, but it would be great if I did, because maybe I'd want to make sure when I came to town to play a concert, you had free tickets front= row center, just as a way of saying "Thank you" for all your hard work and support.
Not only does this allow musicians and other artists to treat different fans differently, depending on how committed they are to th= at artist's work, it also makes the experience of consuming that, of being the fan, so much more engaging, dynamic and interactive.
In short, it creates a better situation for both the a= rtist and the consumer, and makes the entire process more efficient by removing m= any of the intermediaries that often time get in the way, and abstract this data from being seen by the artist.
So, if you're looking for an area that might be radica= lly transformed by blockchain in the coming years, look no further than the mus= ic industry.
And in creative content production, in general, I think we're gonna see a lot of change there.
By the end of this section, you should be able to:
§ Explain how MedChain is using blockchain to store medic= al records.
§ Explain how Blockchain can be used to prevent counterfeit drugs.
Hi, my name is Steve Wishstar. I'm the CTO at MedChain.
The use case that I'm going to talk to you today is ki= nd of... can be regarded as the poster child of how to use blockchain technolo= gy.
You know, along with identity, voting rights, supply c= hain management, healthcare.
The healthcare field is kind of regarded as a prime ex= ample of why someone would not want to want their medical records changed or tamp= ered with.
And MedChain is actually t= ackling that use case.
So, our mission is actually to use blockchain technolo= gy to establish a better, more secure, and transparent framework for storing electronic medical records that vastly improves the quality for the patient= s, while reducing healthcare costs.
So MedChain gives patients= control of their own health information and the ability to delegate that access to providers like doctors and hospitals using the blockchain and a distributed storage system.
The MedChain network itsel= f is an extensible, layered architecture and protocol system that is governed and secured by multiple blockchaines and utilizes a multi-crypto-token currency framework.
And this network is built upon Hyperledger Fabric and permissioned blockchain.
The MedChain solution itse= lf is... We kind of refer to as a common data-layer that allows existing EMR, electr= onic medical record companies, to extend their software that already exists with= in a globally compliant framework that facilitates secure storage privacy and transparency.
Our first objective is to basically reorient the curre= nt architecture, so patients have control over their medical records.
I mean currently, as a patient today, you can tell your doctors what to do with your medical records, but you actually can't do it yourself.
You can't go out there and do it yourself. It's inconvenient.
And so basically, we typically have to call up the doc= tor, pay like a reasonable fee to have them make copies of your medical records = and then fax them over to your other doctor for a second opinion.
So... And then plus, it's on their timeline. It's not = on yours. You can't dictate when that gets done, so it's pretty inconvenient.<= /p>
So, why would we want to streamline this process?
Healthcare itself is becoming more individualistic and holistic.
So, people are choosing what doctors they want to see = as a result of being told what doctors that they have to see within their networ= k.
But we want to transfer our test results over to those= new doctors, so we can get that second opinion.
And it's not just one doctor anymore.
We need the ability to incorporate all different modal= ities of our healthcare together, whether that's like a report from the emergency room,
your yearly doctor's visits, and your blood work, to y= our chiropractor, or even your dentist.
There's no need to basically repeat all these procedur= es or to leave the next provider guessing as to what was done or why it was [done= ], why you're on those medications in the first place.
Similarly, the population is becoming even more mobile= .
So we have like second home= s in different states, our companies are relocating all the time, big adventurers seeking opportunities where we go out for a long time.
Ultimately, our state and national boundaries are beco= ming blurred.
By this physical migration and medical records at this= ... in its current state cannot penetrate those state and national boundaries.
And lastly, portable medical records that you are in c= ontrol of and yet that you can take with you, will be required for telemedicine.= p>
You don't want to just talk to the doctors that are in= your city, and you actually want the best doctors that are available.
So, you want those experts to have your up-to-date med= ical records.
And soon you'll be able to do that with just a few tap= s on your phone, you'll be able to authorize whatever doctor you want to see your current medical records.
And, of course, telemedicine has all the abilities to transform healthcare for people who are not living in privileged areas.
Many regions of the world don't even know what a medic= al record is.
But if some doctor sees a patient via telemedicine, th= ere's no reason why the next doctor has to reask the = same questions and start from scratch.
A global ledger would enable a broad list of people to= offer medical support and have a unified patient-centric approach.
So, why would you use blockchain?
The current approach to healthcare medical records is = to store them all in big, proprietary databases that individual companies own.=
To be sure, I mean like storing medical records is a b= ig security risk and that's why they kind of went this way.
But storing them all in one place is an archaic method= of security.
Blockchain itself obviously has been over... has been turning industries on their head as far as rethinking overall approaches.= p>
You know, blockchain is a distributed global database = and common data layer that anybody with the right credentials can access and pu= ll data from and build applications upon.
Blockchain also creates that system of trust that can enforce how medical records are transferred.
In that way, that's much quicker and safer than a verb= al agreement by doctor saying, "Yes I'll fax it right over".
It can be done instantaneously.
Lastly, blockchain's inherent way for the public to ve= rify each and every transaction is important.
This gives control of your own medical records and you= can tell who sees them and who has access to them.
So, on a practical level, how is = MedChain going to see and be used by the public.
Well, MedChain is going to= be launched in a couple of... multiple phases here.
The first phase is to establish that common data layer= , that all existing and future software providers can plug into.
That common data layer, we call the Secure Medical Rec= ord Chain.
Subsequent phases will release complementary blockchain networks that can build upon the features on top of Me= dChain.
For instance, if a patient gives permission, their med= ical records can be made anonymous and used for research purposes
to see if maybe your reactions to a medication or proc= edure are within the norms of what patients are experiencing elsewhere.
So, we call this Phase II of the discovery.
Phase II of MedChain which= is called the discovery chain that will use off-chain artificial intelligence = and machine learning to pore over the millions of records that could span lifet= imes.
This simply can't be done with data, if it's locked up= in a proprietary database as it is now.
People will interact with MedChai= n in several different ways.
The Patient dApp, or distr= ibuted app, is available free to patients all over the nation and all of the world= .
And that's the application where patients can see their medical records, list out everyone who has ever seen them or touch them, and give new providers access, or take away access from old providers.
In future phases, you'll actually be able to schedule doctor's visits, manage insurance bills, and see what that medical artifici= al intelligence thinks about how you can improve your own health.
The Service Provider dApp,= on the other hand, that's the interface for the actual service providers whether t= hat be doctors or hospitals or laboratories.
And this is, you know, where they add files to a patie= nt's medical record.
MedChain is developing a U= I that doctors will use to upload files and fill in data fields.
But it'll also be an API for existing software provide= rs to talk directly with the blockchain and storage, and to save new patient data= .
This UI gives the provider access to all medical recor= ds that have ever been performed for a patient no matter who ordered them.
And at the same time, obviously, it allows the doctor = to track their own specific procedures that they prescribed.
And if you remember that AI and data analytics of the = Phase II, anonymous medical records, the Service Provider dA= pp will actually give the doctors access to all that data
about what similar patients are experiencing and that = could assist the doctors with making decisions about your own health.
The implementation kind of looks like this, once a doc= tor receives a new file to add to a patient's medical record, the nodes on the blockchain, the peers, will securely handle all the encryption and file transfers,
handle the utility tokens that are needed, provide sto= rage, generate storage invoices, automatically query the storage market and get t= he current storage pricing, reassemble the files and deliver the final products all while complying with the current laws.
Then, as regulations change and get updated, the MedChain blockchain will also evolve to ensure that d= ata is always stored and transferred in a correct and legal compliant manner.
From a Hyperledger Fabric point of view, let's look at= it on a graphical level.
Here, in Phase I, you can see multiple blockchains wit= hin the MedChain network.
We have a permission and identity chain, a chain that = stores metadata about a file, and then a chain that actually stores the storage locations of each of the files after it has been encrypted and fragmented.<= /p>
And you can see that each of these chains has their associated smart contracts or chain code and ledgers that hold the on-chain data.
You can also see the various players in the network.= p>
The patients, the providers, again, whether they're do= ctors, hospitals, laboratories, pharmacists, and then the storage providers and th= ose can be, whether they're existing hospitals already storing data for their patients or in the cloud by third-party providers.
But the data flow kind of goes like this.
The patients give each of their do= ctors permission to add data to their medical record, the doctors' offices verify= the identity of the patient, obviously when they come in for their exam.
The patients generate...
The providers, excuse me, generate new doctor notes or files, such as an x-ray or blood work, and then the provider nodes then enc= rypt the files, fragment them and store each fragment across the network of stor= age nodes.
And basically, that's the fully functional Phase I, EMR distributed storage solution.
But on top of that, we can add in Phase II.
And here, the network can be extended in any number of= ways actually, but the first one that we're going to do, is anonymous medical records.
So the patients can give th= eir permission to have their... to have researchers use their data, and the dat= a is made completely anonymous by removing all of the personally identifiable information.
And all the new anonymous data is then stored across t= he storage network in new files.
And then finally, what is MedChai= n's timeframe for implementing our network.
Currently, the MedChain's = DevNet is being developed.
We're doing network configuration, chain code developm= ent and the UI development already.
Our BetaNet should be actu= ally ready for next year, second quarter of next year in 2019.
And that's obviously where we'll be able to take on so= me beta clients.
And then finally, the MainNet, the main network looking to distribute second quarter of 2020, and this is obviously where we can take on the world.
So, in conclusion, I hope this was a good overview of = the use case for the healthcare industry.
The MedChain network will = store all of your medical records and give you the ability to give those records = to whatever doctor you want to instantly and secure= ly.
So thank you from all of us= at MedChain.
When it comes to getting medication from the manufactu= rer to the physicians and patients, Africa is facing a severe problem with counter= feit drugs.
For costs associated with the use of counterfeit medic= ines, individuals, families, and health systems are staggering.
Every year more than 122,000 African children under th= e age of five lose their lives as a result of counterfeit antimalarials alone.
What if we could track, trace, and authenticate the dr= ugs at each stage of their journey from the pharma company all the way to the pati= ent?
That's exactly what researchers at the IBM Lab in Haif= a, Israel are doing.
We're using blockchain technology to introduce traceab= ility and trackability into the supply chain.
Using blockchain, we can make sure there's a verifiable provenance of what is delivered, by whom, to whom, when, and where.
Within the pharma supply chain, we're setting up a tru= sted network that allows the different parties to store information,
knowing that only authorized members can see it, and t= he information can't be altered once it's been entered.
Specifically for pharmaceutical orders, we can verify = that the authentic drugs are handed over to an authorized party at each transfer point, ensure compliance with the proper conditions for transportation and asset transfer, and we can also make sure that a joint verified ledger of a= ll transactions is available at all times.
This means provenance of each and every drug in the su= pply chain.
Any party in the network can see the status of where t= he drugs are and who has them.
This solution from IBM research includes the mobile interface and the permission blockchain backend that gives each certified a= nd authorized party in the network a way to initiate action, finish their transaction, track its progress and verify that it was done correctly.
Let's look at an example of how this would work.
This is Dr. Msia. She needs tuberculosis vaccines for her patients.
Dr. Msia already checked t= he prices at the local pharmacies and decided to order from ABC Pharma.
She knows that if she arranges delivery from the pharm= acy using blockchain, she'll have more confidence that the drugs are authentic = and also get a better price.
At ABC Pharma in Kenya, Imani received an order from D= r. Msia in Koru asking for three BCG ampoules.
The order is registered in the blockchain.
Imani prepares the delivery for Dr. Msia in Koru and scans the QR codes and serial numbers of the vaccines for the blockchain.
The order is ready to go and the next step involves selecting the delivery carrier.
From the list of possible carriers available in the blockchain system, Imani selects Solomon who has a good reputation score an= d is not overloaded with orders today.
Solomon is motivated to supply a h= igh quality service, because his reputation score is calculated based on= the ratings he receives.
This reputation score helps him get more business from= other hospitals and clinics.
He heads to ABC Pharma where he meets Imani.
When he arrives, Solomon authenticates to the blockcha= in system.
Imani initializes the delivery transfer.
And then Solomon checks the serial numbers of the vacc= ines and accepts the delivery.
All this is recorded and the transaction is appended t= o the blockchain ledger after verifying that both Imani and Solomon are physicall= y at the ABC Pharma premises.
Solomon heads out. The BCG vaccines are stored in a refrigerated box equipped with temperature sensors.
The sensors sent a reading every 60 seconds and any al= arms are saved in the blockchain.
Solomon arrives in Koru and heads to Dr. Msia's clinic.
Dr. Msia greets Solomon an= d they both examine the delivery.
Dr. Msia received an SMS e= arlier with the tracking code. Together they authenticate using the blockchain.
Dr. Msia verifies the trac= king code number of the delivery and scans in and verifies the vaccines using a = QR code scanner.
She also verifies via blockchain that there were no al= erts regarding the temperature during transport.
Dr. Msia accepts the deliv= ery.
Solomon accepts the delivery transfer.
And the transfer is appended to the blockchain, which = now shows the vaccines at the Koru location.
Solomon's reputation score and number of open deliveri= es are updated.
And Dr. Msia can continue = keeping her patients healthy.
Back at ABC Pharma, Imani examines the status of today= 's blockchain transactions.
Happily, all went well with the transfer to Dr. Msia.
This innovative blockchain solution from IBM research = offers new benefits.
It reduces the loss from counterfeit drugs, offers sho= rter lead times of cycles from pharma to patient, and introduces a non-repudiation process with provenance and trackability for fast resolution of any conflic= ts.
By the end of this section, you should be able to:
§ Explain how blockchain can benefit digital voting applications.
§ Understand how Luxoft is using blockchain to create a decentralized voting application.
Blockchain can be utilized in many different fields as= a solution to the problems that a standard database might have. One such prob= lem can be seen in voting. Recently, it was revealed that a major U.S. voting machine manufacturer had installed remote access software on some systems. = This software allowed for the alteration of votes when counting the total.
Instances
like this create a lack of trust in America's voting system, as seen in a
recent poll: "Exclusive poll: Majority expects fore=
ign
meddling in midterms". This poll suggests that only about a quarter of
Americans feel confident that their vote is being counted. Blockchain would
solve this issue by providing a distributed ledger that would ensure your v=
ote
is counted since the ledger you own is the same as the one counting the tot=
al.
Luxoft is bringing voting = into the digital realm with its blockchain-powered e-Vote solution for the city of Z= ug.
How does it work?
Easily, every citizen can go to the City of Zug e-voti= ng portal, login with their digital ID previously obtained from the City of Zu= g, and get a set of unique digital keys generated.
Then, using their keys they can access the open polls = and vote, and, when voting is over, see and verify the accuracy of the results.=
Due to its blockchain nature, e-vote makes voting instantaneous, anonymous, immutable, transparent, auditable by the general public, and decentralized due to no centralized body owning the data and controlling the results.
The City of Zug can now create polls, notify digital ID holders about the upcoming voting and process the results in minutes saving operational costs and time.
Democracy is going digital with L= uxoft.
Find out more at digital.luxoft.com.
A little background on the voting app.
So about three years ago, we wrote a voting applicatio= n for a non-banking financial institution, like savings and loans.
It was a group out of the United Arab Emirates that ha= d come to us and they wanted to have corporate board voting platform.
And so, their requirements like, you know...
It was really important to be able to have share-weigh= ted votings, so a shareholder could distribute their shar= es and votes for multiple candidates or multiple initiatives.
They had requirements for how the initiatives were sup= posed to get proposed such that during a period of time a member could change the= ir votes if they change their mind while the poll was still open.
The member could also see and verify that their votes = were cast properly in the end.
But there was no way for the corporate board to see who voted for what or, more importantly, the requirement that they couldn't correlate to say people who voted for this candidate also voted for this initiative.
And so the team that I work= with is...
They're experts in cryptography and they really took t= his on as a project.
Even though this was a small PoC, we built a really ro= bust voting platform.
And it encrypted each vote individually such that it c= ould be tallied in the end, but there was no way to correlate it back to who cast the vote.
We demonstrated it to them, they thought it was really great.
There were some barriers to adoption, mostly around authentication and an identity.
And so basically, the project just went nowhere.
So, we got the idea that this was some pretty cool technology that we had developed, and the only way to really make it go somewhere was to make it transparent.
And we decided that we would open-source it, and that = we would donate it to... initially, we were going to donate it to the Crypto Valley Association, later we decided that the City of Zug was willing to ta= ke it and use it for their local elections.
And Zug, Switzerland is...
Switzerland is a true democracy. They do the one man, = one vote for every topic.
There's no representative making decisions on your beh= alf for his constituents.
This is like, if there's an initiative that goes up, everybody votes.
So, they have a real need for an optimized and a better voting platform.
And it was natural for us to say: "Hey, we've got= this thing, let's give it to you, let's set it up, let's get it running, and then use it as a platform to not just host elections, but also to foster growth = and innovation around voting.
So that we could learn the approach that we used, see = if there's a better approach, get other people looking at the code and have th= em shoot holes in it, if it has flaws.
And so, we've now given it to Zug.
Zug has used it for some surveys primarily, they haven= 't used in a proper election, but the results have been good.
Everybody... They've had a good turnout of voters.
They are embracive of the technology, which is sort of= an unusual thing with voting.
The next steps then for Luxoft and for what we want to do with it is, we'd like to start a foundation around i= t.
And we've already sort of cast the net out on social m= edia about... that we built this thing, we gave it away for free, it's open source, come look at it.
And also, if you have a voting app that does something= similar, if it's innovation around voting technology, let's build a foundation that = we can use as a collection point for these types of innovation, and in ways to help accelerate getting them embraced.
I had a call last week with a small team that was star= ted from Kaspersky Lab, that have done basically the same thing that we've done= .
They used a little derivation of the technology, but essentially, we built the same thing.
Theirs was built on Ethereum, ours was built on Hyperl= edger Fabric, and so we're going to be moving forward with them open sourcing the= ir voting app as well through the same foundation once we get things set up.= p>
Great, great. And how do you see the future laying out= for that? How far off are they from using that in...
So, I think the biggest thing, the biggest barrier to adoption, or the one thing that is a barrier to adoption, is embracing digi= tal identity.
And blockchain brings some features of digital identit= y that we've never had before, but the challenges is an adoption.
So, one of the things that the City of Zug, Switzerlan= d had that nobody else had is, they've already started issuing a digital identity using the uPort platform that is based on Ether= eum.
And so they have a hundred = or so people in the city that have already shown up at the city office, showed th= em the driver's license and their address credentials and been issued a digital identity on their device that enables them to use this voting platform.
And so, as we move forward, the big adoption challenge= is getting a population of people that are embracive of the technology, and th= at have digital credentials that can be used to login to the platform and cast votes.
Are you guys doing any kind of pushback in any way fro= m the adoption?
Yeah, I think as in everywhere the Swiss population is divided, and they're a little different there than they are in America in t= hat they're not so emotion-driven.
So, you hear arguments for digital voting, you hear arguments against digital voting, and, you know, they deal very much in fac= ts there.
And I haven't heard that this is a danger or a risk or= any of the fear tactics.
I've heard some accessibility issues, not everybody is equally digitally enabled, and that it can exclude individuals that way.
And they are obviously talking about validating creden= tials.
How do we really prove that individuals are who they a= re when they cast their vote?
And I think a lot of that is being sorted out as the technology matures and gets proven out.
I think the big barrier there always is is adoption of digital identities and hopefully we'll see some movement in tha= t in the next couple of years.
Awesome. And not to hold you to the fire later on, but= how far off do you see that first election taking place? I mean, how far into t= he future?
So, it's interesting. I think that rather than how far off... I think that we're close, we could do it now.
So, it's going to take some time to get a population t= hat goes down and gets some digital credentials, but the platform is built.
We've got it set up and running.
I think it's more about "wher= e".
So, I had conversations while I was at the Crypto Vall= ey Conference with a woman from Malaysia.
And I know the Malaysian population is very conducive = to technology adoption.
She said [that] most people in her population have at = least three cell phones, and so when you have a technology-enabled population wit= h a forward-thinking government, you've got a recipe for embracing digital voti= ng.
And so I don't know if Zug = will be the... They were the first, but I don't know if they'll be the leader.
I think that they're gonna= spend a lot of time sorting out the pros and cons, and the do's and don'ts of digit= al voting over the next couple of years.
I think it's more likely that they'll have elections i= n some developing country and around digital voting, and hopefully they'll be able= to leverage some of the work that's being done in Zug and some of the work that might be done by the foundation around digital governments that can help accelerate it.
By the end of this section, you should be able to:
§&nb= sp; Explain how LifeID is using blockchain to create an ID = for everything in your life.
§&nb= sp; Discuss the benefits of LifeID.
§&nb= sp; Explain how LifeID works.
LifeID Self-Sovereign Id= entity
Welcome everyone, I'm Alex Ortiz, Chief Blockchain Evangelist for the LifeID platform.
And I'm here to talk to you about an exciting blockcha= in use case - self-sovereign identity.
Let's begin by discussing some of the problems of the = modern world.
Today, there are three major problems with how we tran= sact online: users have low privacy, fraud prevention efforts cost businesses a = lot of money, and password-based authentication leads to frequent data breaches= .
A self-sovereign identity platform gives developers a = new architecture and new tools to solve these problems.
So, what is a self-sovereign identity?
A self-sovereign identity is an identity made up of da= ta that the user has control over.
Examples of identity data today include: your name, ad= dress, date of birth, government identification number, place of employment and ma= ny other attributes.
A lot of that data currently originates and lives in centralized databases.
When you need to prove some aspect of your identity to= day, three things happen: you pass the required information onto others, you pro= vide some form of proof, and then the recipient checks, usually a centralized database, to see if the information matches.
Now, as we've all seen, identity information in centra= lized databases reduces user privacy and increases fraud when that data is breach= ed and reused to impersonate users.
Protecting that data and protecting against fraud is a= lso costly to businesses.
Blockchain technology, when combined with cryptography= and with self-sovereign identity platforms, will help you solve these problems = or remove them altogether.
With self-sovereign identity technologies like LifeIDs, users won't pass along their identity data l= ike they do today, businesses won't need to store identity data like they do to= day.
Instead of passing on a date of birth, a user will be = able to pass along a claim that they are over a certain age.
Instead of passing on an address, a user will be able = to provide a claim that they are a resident of a certain country or state.
Instead of passing along a government-issued identific= ation number, a user will be able to pass along a claim that they have a valid ID, and so on.
In other words, instead of sending private information, users will soon be able to send claims that certain information is true.
The claims will be signed by the issuing party using cryptography, the signature will serve as evidence that it is a true and va= lid claim, and for this reason, they are called verifiable claims.
And user will then be able to choose to show that veri= fiable claim to a verifying party who will then be able to check that the signatur= e is valid,
that the claim is still valid, and that the claim belo= ngs to the user and to nobody else.
These verifiable claims will stay with the user on the= ir mobile or other device, not stored in centralized databases like identity d= ata is today.
This technology will lead to fewer privacy violations,= less identity theft, and fewer data breaches.
But it will be up to developers to build identity applications utilizing self-sovereign identity platforms like LifeIDs.
So now, let's talk about the role of the underlying blockchains.
A self-sovereign identity system is built on top of a blockchain.
The blockchain plays two major roles.
One, the blockchain serves as a cryptographically secu= red network for verifying signatures on verifiable claims.
And, in our model too, the blockchain will act as a decentralized payment processor for identity transactions.
As a wonderful bonus, self-sovereign identity platform= s will work worldwide.
Now, let's talk about some example= use cases that are already happening - medical licensing.
Some medical licensing boards have begun to issue medi= cal education certificates and graduate medical examination credential to docto= rs.
The doctor is able to share their certificate with a hospital and the hospital can verify that the certificates are valid, speed= ing up how quickly a newly licensed doctor can begin working and ensuring the medical credentials cannot be tampered with.
The second use case is academic credentials.
Several universities, including MIT, the Massachusetts Institute of Technology, have begun to offer their students the option of obtaining proof of graduation as a verifiable claim.
And the third use case is being able to prove that you= r business is in active standing and that you are able to do business in a certain pla= ce.
So now, let's discuss where you can learn more.
We're part of an ecosystem of companies and organizati= ons that believe in the future of self-sovereign identity.
You can find out more about this technology by seeing = what the World Wide Web Consortium, W3C, Credentials Community Group is doing wi= th its decentralized identifier specification.
And what the Verifiable Claims Working Group is doing = with the verifiable claims data model.
You can also learn about other components like the Uni= versal Resolver at the Decentralized Identity Foundation.
Finally, you can read more about the LifeID platform by reading the white paper at lifeid.io.
And you can conduct online research on what other self-sovereign identity networks are doing, including = Sovrin, Blockstack, uPort a= nd others.
Thank you for your time and I hope you help us change = the world by building on a LifeID platform.
LifeID is a secure blockchain-based decentralized identity solution for your life, both online= and in the real world.
LifeID's mission is to pro= vide every person with a lifelong self-sovereign digital identity.
This digital identity will allow anyone to securely and easily manage any online and real world transact= ion that requires identity authentication.
A self-sovereign digital identity will put the owner in complete control, without relying on the oversight or control of a social network, company or government.
LifeID gives users the con= venience of Facebook or Google as an identity provider, but without the concerns of privacy violations, having your personal data sold as a product ,or being denied access on a bureaucratic whim.
With LifeID, you decide wh= o gets to access your private identity data.
Using a biometric secured phone app, LifeID gives you the convenience and control to easily run your daily life.
You can log in to any site without usernames or passwo= rds, enter any building and participate in any identity-based transaction with perfect ease and confidence.
LifeID is able to offer unparalleled security and convenience through the power of blockchain and cryptography.
The beauty of LifeID's decentralized permissionless identity solution means it can exist on top of= any smart contract-based blockchain, expanding the potential reach across the globe.
LifeID is the new standard= for identity that exists everywhere.
LifeID is your identity wi= th convenience and control, for life.
Stay tuned for more information and be sure to follow = us on Twitter at lifeid_io.
By the end of this section, you should be able to:
§ Learn how Cook County, Illinois (USA) is using blockchain to record land titles a= nd show ownership.
Hi, good afternoon! My name is John Mirkovic, Deputy Recorder of Deeds at the Cook County Recorder of Deeds office in Chicago, Illinois.
I want to thank you for watching this course and your interest in blockchain technology, and also thank our Recorder of Deeds, Ka= ren Yarbrough, for allowing me and this office to experiment with this new type= of technology.
So, there's a few reasons why blockchain is interestin= g for land records, and that's sort of how Cook County came to this project.
About two years ago, we were the first county-level of= fice, and perhaps the first government office in America, to endorse the technolo= gy behind Bitcoin, which is a blockchain, decentralized database.
And we saw right away the transformative power that su= ch a database could have on government and real estate transactions as a whole.<= /p>
So, I want to first talk about briefly why real estate= makes a lot of sense for blockchain, and one of the main reasons is that a real estate transaction in the United States requires multiple parties, sometime= s up to 20 or 30 different entities, to agree on a single set of data, and that's what a blockchain does; is it allows people to reach consensus on facts in a quicker manner.
And currently, right now, the way it's done is very paper-intensive, and it takes a lot of time, and it's expensive to get ever= yone on the same page.
So, a blockchain-based land record, where everyone kne= w who the owner of a property was just by looking at the record, would be a game-changer for real estate in the United States.
Another reason that blockchain makes sense for land re= cords is that land records in the United States are already kept as paper blockch= ains - that's a good way to think about it: each parcel has a time stamp to reve= rse a chronologically ordered and legally immutable chain of events that happen= ed on that parcel.
So, the fit between blockchain and the way records are currently kept in paper is very congruent, so it makes it very easy for land records professionals to sort of get the metaphor on why this would work.= p>
Another reason that land records, or even government l= and records, could benefit from blockchain is that in the United States, our la= nd records, in many states and counties, are not required by law to be kept up-to-date.
The public record is there, but it doesn't have sort o= f the gold standard power that it should have to allow people to be able to trans= act real estate quicker.
One of the things blockchain can do is finally get us = to where anyone can go on the Internet and see who owns a property at any given time.
And another reason that blockchain makes sense for land records is fraud.
In Cook County, we have... it's fairly common where pe= ople will attempt to steal other people's homes on paper.
That's because our current paper-based system doesn't require or even allow any verification of the data that's used in a deed or conveyance.
So, a fraudster can forge a piece of paper and steal someone's home on paper easier than they could steal their neighbor's Wi-Fi= .
That's one of the things that really attracted us to blockchain, was at least protecting the conveyance of a property behind a public/private key pair.
And sort of... one of the big reasons for taxpayers, t= he fifth reason, is that all of this would save people money in the process...=
perhaps up to a thousand dollars per transaction when = you start to remove the need to have intermediaries in a transaction, whose sole purpose is to provide some co-verification or insurance policy against a government record.
So, those are the benefits that blockchain can provide= for real estate.
As I said, Cook County released a final report about a= year ago, at the end of May 2017, on our findings, and we found some very promis= ing path forward for blockchain.
We first need to to make t= he public record mandatory, but once that happens, we'll be able to start to g= et towards a better system, where we can agree on a set of facts quicker, make real estate more liquid, make it easier to transact real estate without hav= ing to take multiple days off of work.
So, that's really the power of blockchain for real est= ate, especially if you look at an end-to-end transactional environment, one where the transaction goes from real estate agent to recorder and the same data that's used in the transaction becomes the public record, and that really i= s an important feature of blockchain for government, to be able to use the exact same data in the public record as was used in the transaction, as opposed to now, where government employees accept emailed copies of documents, and then data enter that into another record, and, as you know, with data entry, the= re can be room for errors.
So, blockchain is all about getting us to a set of fac= ts we can agree on a hundred percent accurate public record, and really an end to= paper-based recording fraud.
And that will allow America to get its very good land = record system to the next level.
Blockchain, as a concept for government, can be very transformative for public administration in the United States, because it allows us to take this Internet that we've built up over the last thirty ye= ars, and really make it a transactional internet finally.
So, we're at a point in in technology where we've conn= ected everyone together on the internet, but we have no mechanism to know whether= the person we are interacting with via email or social media is even truly the person that we think they are.
It really limits our ability to conduct commerce on the Internet, which is something that we've been promised a long time.
The blockchain for government and for the Internet is = a part of a larger concept called Web 3.0, which is really about cybersecurity... = it's based around a topic called decentralized identity, DID, in which, for government, it's sort of helpful to imagine a decentralized identity as the center hub of a wheel and spoke kind of idea on how blockchain can transform government.
So, by reimagining how we identify ourselves, getting = our personally identifiable information off of centralized outdated servers and mainframes that can easily be compromised by hackers and foreign agents, we= get the idea down to the person level, where we're each controlling our own personally identifiable information on encrypted devices.
Once we spread out that attack vector, we would have distributed the identity and made it harder for hackers to find it.
Now, we plug in people into the spokes of the blockcha= in system, which is a... you can imagine one of the spokes being a Land Records Registry, or another one being a just a multi-asset registry that could be = used to register vehicles and trade them between people.
Now that you have this system set up, where everyone's identified in this new way, and we can use public/private asymmetrical key pairs to sign off on transactions, and other things like webcams, and fingerprint scanners add extra security, and once you have that identity in place, in the center, now you can do things like transact vehicles between = two parties, change the name on a title by using a phone app remotely, so you c= an now sell a used car on your lunch break, as opposed to having to take the entire day off of work, fill out hundreds of dollars w= orth of paperwork and go to different DMVs and Secretary of State's office to register those.
And, as you can imagine, in Illinois not everyone goes= and immediately registers the new car.
So, sometimes people get parking tickets and speeding tickets after they've sold a vehicle.
So, that's one way to imagine how blockchain can have a great impact on taxpayers, especially those who are lower income and cannot afford to take a day off of work.
That's just one of the benefits of blockchain.
Some other bigger ones are just a way to permanently s= tore digital data, as opposed to having to build warehouses to store paper recor= ds.
Blockchain allows us to be on a path towards permanent storage of data, and which is cheaper and easier to maintain, and requires = less facilities and it gives us towards paperless workflows, an end to entering = data and re-entering data constantly, and the types of errors that come with tha= t.
And as you can imagine, if you plug this identity mode= l into a county level hospital system, now you've got a permanent decentralized encrypted way to store medical records that people... the burden of recreat= ing them isn't on the patient every time they visit an office, or the burden to reprove who they are every time they visit a new office is not on the sick = or elderly taxpayers, so that the benefits for government are quite profound, = and what it really does is, it gets the government away from being just simply a customer of technology, and blockchain now is in such a nascent state that = it really empowers government employees who are interested in in long term outlooks to be a part of this next revolution of government administration.=
You know, be an innovator and help design how these sy= stems work as opposed to waiting 10 years for the private sector to figure it out= and then sell it back to us at ten times the price.
That's really the sort of innovation that blockchain b= rings to government... an entirely new way of organizing the internet and how we interact with it as citizens.
And we have a lot of models in Europe to look to for e-government, as kind of the gold standard that we're looking for, like Est= onia or Dubai, and we can finally get government services down to something that= can be securely administered remotely.
That's what government and blockchain has in store for= us.
It's hard to get up to speed on blockchain unless you'= re willing to spend a week down what I call the rabbit hole.
So, you know it, you have to go into the technical stu= ff a bit to understand how it works and why it works.
There are some good websites out there that explain fr= om a more layman's perspective what really is the technological revolution here,=
It's now... the good news is, now it's more important = to understand what you can do with it as opposed to how exactly it works, and being able to explain.
It's... maybe two years ago it was a little more intimidating to get into it because there were a lot of people policing the language and definitions of what blockchain is, and they sort of made it an intimidating environment for people to explore,
But now, two years later, blockchain, the definition h= as morphed into simply a new way of design thinking to engineer workflows, hardware and software.
So, there's a lot of ... it's still new out there...= p>
So, you haven't missed the boat and there's time you h= ave to spend a little bit of time down the rabbit hole... there's some good reports out there from the Illinois Blockchain Initiative, that really summarize wh= at really the best use cases are for government.
So, you need to be able to explain why a decentralized database is better than a centralized database.
Once you're able to do that, then that's really the bi= ggest hurdle.
Once you're able to explain that, then everything else= falls into place.
The land records are extremely important for our econo= my, but also, I think about the county clerks out there who generally, in most jurisdictions, maintain our most important vital records... so, our birth records, our voting records, our marriage, divorce and death records...
There's... I think about, in Illinois, how people have= to apply for their right to vote...
Basically, they have to fill out an application to tel= l the government that they are 18, and then someone has to verify that.
One of the easiest things to think about is that if yo= ur birth event is registered on a blockchain, on a smart contract, and you have the same database in place, the day you turn 18, you should be able to walk into a polling place and vote, and not have to apply to exercise your constitutional right.
Being able to keep these birth and death records and m= ake them easily available...college transcripts, you know... being able to plug them into like LinkedIn, for example, and having them sort of co-verified by LinkedIn and your educational institution is sort of removing a lot of these bureaucratic hurdles.
And blockchain is really about allowing people to do business with each other more easily.
So, anywhere where there's an application that needs t= o be filled out, and somebody needs to verify something that someone should alre= ady know, that's where we should be looking for blockchain to sort of revolutio= nize the way we deliver government services.
I can imagine there being more sort of field agents out there in government who they just sort of roam around, and, if you need them almost like a notary, they're there, you can meet with one of these people = in a coffee shop, prove who you are, get set up on this new government applicati= on, and then really, you can start to access these services without having to visit= an office.
So, you can start imagine government having a smaller physical footprint, needing to maintain less buildings, and really being ab= le to permanently store data and know what's going on and be able to make more things happen remotely.
By the end of this section, you should be able to:
§&nb= sp; Describe how blockchain is enabling supply chain more than ever before.
§&nb= sp; Provide examples of companies planning on using supply chain to provide an extra le= vel of transparency to consumers.
Global trade functions much as it has since the introd= uction of the shipping container in 1956.
Manual, paper-based processes are still common and information about the status of goods is locked away in organizational silo= s.
Today, 90% of goods in global trade are carried by the shipping industry with the supply chain slowed by the complexity and sheer volume of point-to-point communication
across a loosely coupled web of land transportation providers, freight forwarders, customs brokers, governments, ports, and oce= an carriers.
IBM and Maersk are addressing this problem with a distributed permission platform accessible by the supply chain ecosystem designed to exchange event data and handle document workflows.
Maersk and IBM are employing blockchain technology to = create a global tamperproof system for digitizing trade workflow and tracking shipments end-to-end, eliminating frictions including costly point-to-point communications.
The collaboration will launch with the potential abili= ty to track millions of container journeys per year and integrate with customs authorities on selected trade lanes.
In a recent test by Maersk, shipping a single containe= r of flowers from Kenya to the port of Rotterdam resulted in a stack of nearly 2= 00 communications.
Using this example, we will examine how blockchain has= been implemented to create trust and security in the digitized document workflow= and improve the efficiency of global supply chains.
Here we can see each distinct entity involved in the transaction: the growers, export authorities, ports, customs, and importers= .
Shipping from the port of Mombasa requires signatures = from three different agencies approving the export and six documents that descri= be the origin, chemical treatments, quality of the produce, and customs duties= .
Firstly, using a PC or mobile device the Kenyan farm s= ubmits a packing list that becomes visible to all participants.
This action initiates a smart contract that enforces an export approval workflow between the three agencies.
As each agency signs, the status is updated for all to= see.
Simultaneously, information about the inspection of the flowers, the sealing of the refrigerated container, the pickup by the truck= er, and the approval from customs is communicated to the port of Mombasa allowing t= hem to prepare for the container.
All actions relating to the documents and the physical= goods are captured and shared: which documents were submitted, when and by whom, = where the flowers are, and who is in possession of them, and the next steps in th= eir journey.
Flowers are perishable, so it's crucial that there are= no delays or missed steps .
Blockchain provides secure data exchange and a tamperp= roof repository for these documents and shipping events.
This system could significantly reduce delays and fraud saving billions of dollars annually.
And, according to the WTO, reducing barriers within the international supply chain could increase worldwide GDP by almost 5% and to= tal trade volume by 15%.
Farms are complicated
ecosystems with many moving parts, careful timing, and seasonal financing
structures. However, after the food leaves a farm, it becomes part of a
wide-reaching supply chain with a lot of parties. Buyers, sellers,
distributors, and grocery chains all want to know where the food is along i=
ts
journey. You also probably want to know where your food has been before you
serve it on your dinner table.
The trend toward blockchain agriculture promises to ma= ke each step of growing and distributing food simpler. It will offer all parti= es involved a single source of truth for the agriculture supply chain. In this article, we will cover four key ways that blockchain is changing agricultur= e.
Walmart and IBM dive deeper in their use case&nbs= p;as we will review on the next page.
I purchased a pack of mangos, I came into my staff mee= ting, I put them on the table, and I said: "Your traceback exercise starts r= ight now".
And we timed how long it took them to get the informat= ion for each point in the food system all the way back to the farm.
And I'm not gonna give you= the results.
After the pilot, but it's gonna= span> be good.
When a customer shops in our stores, we know they expe= ct great prices, we know they expect fast, clean, and friendly service, but an unspoken expectation is that they expect the products that they buy in our stores to be safe.
You know, when there's a food event or a food scare wh= at you want to do is you want to be fast, but you want to be right.
That food product is guilty until proven innocent.
We at Walmart, will actually pull all the product unti= l we know what is the implicated product and can put then the safe product back = out.
And so, imagine, if we could pinpoint with certainty, = within minutes not days, that it was the implicated product.
Walmart and IBM are working to make that a reality.
If you think about the food system, it's pretty comple= x.
It involves farmers, processors, distributors, and the= way traceability is done today, each segment of the food system does it their o= wn way.
Most actually do it on paper or on systems that don't = speak to each other, and so you can never have a full view of what's happening in= the food system.
What we hope to do with blockchain is bring all food s= afety system stakeholders and collaborate so that we do it one best way, we can d= o it very quickly, and efficiently.
Blockchain is a digital ledger that allows different segments of the food system to capture information about the product, what they've done to it, where that product has been.
If we're linking that data with other data points, the= Internet of Things, all that information will yield to insights that will allow us to have a safer, more affordable and sustainable food system.
But we don't believe traceability is the goal. We beli= eve that transparency is the ultimate goal.
Blockchain will give us the ability to not only track = where food came from, but how it was produced, was it produced safely, was it produced responsibly, is it sustainably grown, how many dates of shelf life= are left on that product.
The food system is a shared responsibility and for blockchain, and traceability, and transparency to work we need a lot of peo= ple working together.
So, we're excited to be working with IBM on this block= chain initiative, but it's not just Walmart and IBM, we actually have some of our suppliers participating in this pilot, we've got some universities also participating in the pilot.
And so, we'll make sure that all stakeholders work tog= ether for a safer and better food system.
By the end of this section, you should be able to:
§&nb= sp; Understand what IoT is.
§&nb= sp; Discuss the current problems with IoT.
§&nb= sp; Analyze how blockchain can be used to solve these problems.
Imagine you are sitting on your couch watching your fa= vorite reality show or sports team on your smart TV. During a commercial break, an= ad for Papa Johns latest culinary creation catches your attention as your sto= mach reminds you at the same time that you havent had dinner yet. So with a click of the remote, you select the items th= at youd like to try and an order is queued in your mobile app that will communicate the details of your order, apply a coupon deal, and share your delivery address. However, a quick internal scan by your smart refrigerator reveals there are still some leftovers from the last time you ate out. Alexa alerts you before your order goes through and gives you an opportunity to cancel it. You decide to follow through with the order anyways, because aft= er all, that old pizza doesnt have stuffed crust inside of the already-stuffed crust.
Within a half hour, you receive a notification on your= TV that the delivery driver is three minutes away and your front door lights automatically turn on in anticipation. In a matter of minutes, the doorbell rings and your show pauses. As you approach the door to greet the delivery driver, it unlocks. After you enjoy your dinner and finish your show, your biometric wristband coordinates with your phones health app to analyze your dietary and exercise trends over the past week. Within seconds, a step coun= t goal for tomorrow is set and several healthy options for your next meal are suggested in accordance with the contents of your fridge. This scenario is = not far from being a reality, and smart homes with this degree of connectivity = are only the beginning of the new technology paradigm in our immediate future.<= /p>
The potential applications for IoT devices are practic= ally endless, and they encompass industrial and enterprise-level applications in addition to consumer applications. From companies to cities to countries, t= he opportunity to leverage IoT technology and the data it generates is massive. Businesses can enable dynamic supply chains responsive to consumer demand, cities can minimize energy consumption and traffic congestion, and countries can operate on highly efficient transportation grids and national security networks. However, there are two significant concerns currently inhibiting Internet of Things adoption, security and scalabil= ity.
In terms of security, IoT devices and the networks the= y are plugged into can be susceptible to cyberattacks, putting private or personal data at risk. Many IoT devices are designed to operate on low power network= s, utilizing only the essential components for connecting while excluding the computing power necessary to run custom cybersecurity protocols. That being said, a breach in a single device could compromise an entire network, rende= ring vast amounts of confidential information vulnerable to attack. Additionally, the majority of IoT networks operate on centralized cloud solutions, both f= or storage and processing purposes. This type of centralized architecture leav= es a network exposed to cyber threats and also limits a networks ability to sha= re and process information. As the global IoT network expands to billions of n= ew devices over the next few years, the sheer amount of data generated will overwhelm = our current IT infrastructure, restricting much of the value IoT networks creat= e.
In recent years, another revolutionary type of technol= ogy has emerged that could very well be the solution for alleviating the primary pain points facing IoT technology, that technology is blockchain. Blockchai= n is a challenging topic to assign an all-encompassing definition to due to the extensive nature of the concepts and implementations that fall underneath i= ts umbrella. As a matter of fact, the term blockchain today is not unlike the term "internet" in the late 1990s and early 2000s, in that= it comprises a plethora of ideas, components, and applications all headed in u= nique directions. However, blockchain can be generally defined as a decentralized network where participants are granted certain rights to exchange, examine,= and manage information or value securely with other members of the network. In addition to these rights, each node is responsible for working with all of = the other nodes to confirm and keep an undisputed archive of all information ma= de available throughout the network, which is also distributed amongst all the members.
Blockchain could help address many of the security con= cerns faced by IoT networks. Cryptographically encoded communication channels wou= ld permit devices to speak and exchange data with one another securely, and Byzantine Fault Tolerant algorithms would identify threatening devices and prevent them from incapacitating the rest of the network. Permissions could also be granted to each IoT device, determining which nodes would be able to submit data, communicate with other nodes, and view the ledger within the network. So things that might be more susceptibl= e to attack can be assigned write-only permissions, and the rest of the network would monitor these devices and verify that the data they are contributing = is valid. Additionally, processing power is allotted to each participant in the network rather than being owned entirely by a central authority, improving latency and facilitating scalability within the network. By allocating resources and responsibilities democratically among network participants, an IoT network powered by blockchain could operate on a highly-efficient and scalable model. Dynamic interactions between devices could optimize end val= ue and enable real-time, data-based decision making. Together, these two technology megatrends are very well suited to complement one another and th= eir union will usher us into a new era of connectivity and utility.
Lets review the smart home scenario from earlier and = see a few examples of how an IoT network built on a blockchain framework could interoperate and harmonize. To begin, every smart device from your TV to yo= ur wristband would be able to connect and communicate securely within the blockchain network, ensuring absolute privacy of your personal data. This w= ay your fridge can talk to your phone which talks to your smart lights and so = on in a safe and efficient fashion. A blockchain network could also support pa= yments, allowing an app on your phone to automatically pay for your pizza or other goods and services with digital currencies designed for highly efficient and inexpensive value transfer over the internet. Additionally, tasks like re-ordering household essentials or scheduling routine home maintenance cou= ld be automated by leveraging the data made available by assorted devices. The technical term for self-executing transactions like these is a "smart contract", which is a piece of code built on top of the distributed le= dger (or data) layer programmed to execute a specific task once certain data inp= uts are met. For example, you could create a smart contract that re-orders coff= ee beans when its been 30 days since you bought your last bag or your annual = AC inspection could be automatically scheduled with a preferred technician in accordance = with your calendars availability. This opportunity for automation also sets blockchain apart as a superior solution to alternative IoT network structur= es, like edge computing within cloud-based systems. The smart contract layer bu= ilt on top of the data and communication layers unlocks an unbelievable amount = of potential for an IoT network, especially those with industrial or commercial focus.
Luxoft plans to implement = blockchain to keep the IoT secure.
We've got a client that we're working with. They're a European company and they manage IoT devices in smart cities.
And we've built application for them to increase the security around their firmware and configuration updates.
And so, we built this on a Hyperledger Fabric.
It basically allows administrator to use his credentia= ls to push some IoT firmware out.
Say you've got a new firmware update for a class of ca= meras that you've got throughout the city, you write the binary for that firmware= to the blockchain, and that triggers a notification that goes up to the camera= s of their appropriate type letting them know that they need to come pull the updates.
You know, because it's a distributed system, it easily manages the load of pushing those configuration updates that the devices can all go to different nodes to download the updates, the binaries, and the updates are immutable, so they're protected against hacking once they're written out.
And, there's another layer of security that's used to connect the devices and transfer the data through encryption that gives ano= ther level of protection for the way that the update gets out onto the devices.<= /p>
And so, it was kind of a cool use case in that it does= n't run into some of the challenges that you typically run into with scale and = the volume and those sorts of things.
It was a way of using blockchain in a kind of a clever, intelligent way to manage IoT devices, well within the range of the current capabilities of Hyperledger Fabric.
Great, great. And so, where are you guys at with that process? Did you guys actually... Was your use case a proof of concept or d= id you guys apply this?
We did a proof of concept for them, they loved it. The= n we did a pilot rollout and the pilot rollout involved us building a lot of operational utilities around the system.
So, the actual smart contract that manages the firmware updates and allows the devices to connect, that was all pretty straightforw= ard and most of that was developed in the PoC.
The next step for production rollout was [to decide] h= ow do we monitor these devices, how do we get insight to what's running on what devices, how do we view the audit trail of the logs of when devices got upd= ated and check the health of everything.
So, we spent a lot of time building the operational wr= appers around the system.
The company has taken that into a pilot project right = now and they basically asked us to hold off right now, because we were being so fast that they're having trouble keeping up with onboarding devices.
And rather than continue to work on our backlog and ev= olve the product, they wanted to get caught up and get a little bit more time to= use it before they give us feedback of changes that they want to make.
But essentially, the project is in pilot and seem to be working wonderfully.
Okay, I'm gonna ask you to= look in your crystal ball a little bit and again I'm not going to hold you to fire later on, but what does the future look like with IoT and blockchain and ev= en AI and blockchain?
Well, IoT and blockchain...
So, I think that IoT and blockchain... blockchain is primarily going to be used for identity around IoT devices and the same thi= ng with artificial intelligence.
So, blockchain technology doesn't shine when it comes = to massive volumes the data being poured into it.
And so, from an IoT standpoint, blockchain doesn't rea= lly... it's not a huge data collection mechanism.
It's more of a state management mechanism, so if I wan= t to know what the state of the devices on my network is and I want to have a reliable audit trail of what's happened and those sorts of things, blockcha= in is a good technology.
So, I think that it's going to be relatively limited, = for relatively limited use in an IoT, more around identity and reputation, but = IoT is a really broad spectrum.
I know that in... I was just recently [participating i= n] an automotive symposium and one can say that cars are IoT, and stoplights are = IoT, and you listen to some of the scenarios that they're talking about doing th= at are really interesting in that they're going to use artificial intelligence and= IOT in combination with automated driving or to negotiate intersections by cars broadcasting their intent.
So, your self-driving car is going to broadcast the in=
tent
that I admitted, I could either turn left or go straight at the next
intersection, and this hive mentality of all of the cars around you are
And in that system, really the only place blockchain c= ame in was that they needed a way to make sure that you didn't have nefarious devi= ces coming on, posing to be cars that caused mayhem at intersections.
And so, blockchain was primarily used for the identity= of the cars and for the reputation of the cars.
And so, basically, an autonomous vehicle will establis= h an identity and over a period of time build a reputation determining whether or not when it says I could go straight or I could turn left...
Can it be trusted? Is it actually going to do what it predicts it's going to do or is this something that we need to kind of watch out for.
And they talk about the incentive model in all of this= .
And, of course, blockchain plays into the incentive mo= dels in that autonomous vehicles negotiating traffic = might trade tokens or coins to have someone allow them to pass.
You may feel relaxed today and you don't feel like you= 're in a hurry to get home from work and so you may take a more relaxed throughout= and actually accrue tokens by letting people pass you.
And so, there's this mechanism of digital economy arou= nd negotiating and traffic, and all of these things sort of fit in the broader= IoT scale.
I don't know where it's gonna go, but I think that the core technology that blockchain is gonna bring in just about any technology stack, is going to be around identity, reliable identity, and reputation.
By the end of this section, you should be able to:
§&nb= sp; Explain how blockchain is changing the energy industry.
Now, are you seeing interest in it not only from the publicly traded enterprises, but also some of the state-run organizations in that part of the world?
Digital took about eight years to become the priority = of the C-level or maybe not even the priority, let's say just to get on their rada= r, it took digital that long.
We're seeing CEOs come out and want to talk about bloc= kchain and want to understand it.
That is the impact. And in my entire career in this in= dustry, I've never seen the highest C-level executives want to know about this, wan= t to understand this.
This never happened with digital, with IoT, with AI.= p>
It was not there, but it's there with blockchain, and = it's there with blockchain from when the hype really started kind of mid of this year.
And I think it's the hottest topic in this industry at= the moment.
So, let's drive that a little further then. Is the pub= lic sector, where some of these enterprises may be classified...
Are they moving just as fast as the private organizati= ons are to adopt this or at least to understand it better?
I think on the understanding yes, the adoption is stil= l a little bit away, but we are seeing a lot of interest on proof of concepts.<= /p>
Organizations wanting to try it out and really see wha= t it can do.
I would agree, I think a lot of the research I've seen= is that there's been a lot of PoCs, which is fine, because this is certainly a POC starting point, and those are quickly evolv= ing into, once they see the immediate benefits, into the longer-term project wh= ich has been great.
And I wonder, Morgan, do you see the, let's say, the s= lower speed of the adoption of just outsourcing in general, in the industry?
Do you see that being overruled, because blockchain is= a need, and a must, and a have right away moving more quickly to adopt even a PoC?
I certainly do. I mean, I think the one thing is, you = know, recently Venezuela, for example, created the Petro which is a cryptocurrency which obviously is based on blockchain technology.
And that's tied to oil prices. So<= /span> this has gone at the state, national level.
And so yes, it's... We're seeing that it is, because i= t's new, it is because it's hot topic.
And there are reports out there in the world that like= 10% of a global GDP is gonna be based on DLT blockc= hain technology.
So yes, I think it's just getting to understand it, is really why the organizations are there.
And, the thing about blockchain is, from an industry perspective, there's not a lot of people in this industry that truly unders= tand what blockchain can do for them.
At the same time, blockchain is so nascent as a techno=
logy
that even your traditional technology majors, let's call them that, the
And I think that's also what's disruptive, I can't necessarily just go to my traditional consultants who are going to come in = and say: "Well, we know about blockchain", because they don't.
So, do they know about the industry, and do they know specifically about blockchain?
And that's a very hard thing to do, because if you get= stuck on the platform or a specific platform on blockchain within your organizati= on you can be really, really at a disadvantage.
There are so many platforms out there for public chain= s, private chains, if you want to do your own tokens, specific tokens that you want to release into the market and all of this creates a new world and a n= ew world with new skills.
So Dmitry, I think Morgan g= ave us a solid overview of the blockchain initiatives taking place in the industry.<= /p>
I think that was a good macro, sort of bird's-eye view= of what's happening.
By the end of this section, you should be able to:
§ Discuss about some future industries that blockchain might disrupt.
§ Describe the potential of blockchain technology.
What is the future of blockchain?
That is a big question.
And unlike everything we have already talked about in = this course, this is nothing factual, but just my own opinion.
I think blockchain is a really, really exciting place = right now.
Blockchain tends to get talked about in the context of= a lot of other exciting emerging technologies, things like IoT and smart devices, self-driving cars and autonomous devices, AI, virtual and augmented reality= .
The truth is, in my opinion, I see blockchain as an en= abling layer for many of these other technological revolutions.
Everybody is excited about the idea of smart devices.<= /p>
Wouldn't it be great if I had a smart refrigerator that automatically reordered more ketchup as it started to get low?
Everyone gets a little nervous when it comes time to actually talk about implementing something like this, because how do we pro= tect it?
How do we ensure that the data the system uses is immu= table and secure?
Blockchain provides that.
So, I think that we are going to see a lot of growth in emerging technologies as blockchain continues to emerge, because it's going= to make more and more things possible.
And if we talk long term, and again, only my opinion, I think blockchain becomes the enabling layer for a multi-planetary human economy.
You might have seen earlier this year, February 2018, = SpaceX put up Falcon Heavy.
Because SpaceX and Elon Musk are committed to getting = us to Mars.
And I truly believe in the next 20 to 50 years we are = going to see a human colony on Mars.
Now, one interesting thing about Mars is that it's rea= lly really far away.
At the closest Earth gets to Mars, it's a 26 minute roundtrip at light speed, and there's two weeks out of every March and year, where Earth and Mars can't communicate because the Sun is r= ight in the middle.
Well, think about this: if you run a small pizza shop = on Mars, you close out your register for the day, and you need to deposit funds into your bank account, and that is a bank on Wall Street, New York City, a= nd under the best case scenario, that's a 26-minute roundtrip, you can see how centralized models of the Internet aren't going = to scale.
So, if you ask me, I really believe technologies like blockchain and supporting technologies like IPFS are the enabling technolog= ies to allow humans to continue to trade and interact and conduct commerce with each other when we become a multi-planetary society.
And that's why I think there's a ton of potential in blockchain and it's something really exciting, and hopefully, you're all inspired to stay up-to-date with.
Blockchain is already being used in many industries.= p>
We looked organizations taking advantage of block= chain:
§ Luxoft is using blockchain for a decentralized voting application that ensures every vote is counted. They are also using blockch= ain to make the Internet of Things more secure than it has ever been, to change= how automotive ownership works, etc.
§ IBM is using blockchain in supply chain to do things like preventing counterfeit drugs in Africa, or to allow consumers to feel more confident when selecting produce. These are just a few applications IBM has used blockchain for.
§ LifeID is using blockchain for a universal account associated with your identity.
§ Cook County, Illinois (USA), is using blockchain to keep land records more secure than ever before.
§ MedChain is using blockchain to change the way that m= edical records are kept, making it more secure and universal than it has ever been before.
© 2021 edX Inc. All rights reserved.
深圳市恒宇博科技੍=
7;限公司 粤ICP=
备17044299号-2<=
/span>